8 Ways to Use e in Microsoft Excel

In this quick and effortless Excel tutorial, I’ll show you how to use e in Excel.

You often come across mathematical, statistical, engineering, and finance models where you must resolve problems using the mathematical constant e or Euler’s number. It’s a fundamental component of natural logarithms and continuous growth calculations.

Through this guide, I’d try my best to guide you through the process of utilizing this mathematical constant within the versatile spreadsheet software, Microsoft Excel.

Whether you’re a student, a researcher, or a finance professional, understanding how to use e in Excel can enhance your data analysis and visualization capabilities. From calculating compound interest to predicting population growth, the applications of Euler’s number are vast. So, let’s dive in and explore the use cases of e in Excel with real-world datasets.

What Is e?

Euler’s number, denoted as e, is a mathematical constant approximately equal to 2.71828182845904. This constant was originally discovered by the Swiss mathematician Leonhard Euler in the 18th century. It’s also an irrational number, meaning it can’t be expressed as a simple fraction. Its decimal representation goes on forever without repeating.

e is deeply interconnected with the concept of continuous compounding interest. It also serves as the base for exponential functions and logarithms. It plays a crucial role in modeling natural phenomena involving growth and decay, such as population dynamics, radioactive decay, and financial investments.

The Excel formula syntax EXP enables you to calculate e raised to the power of any number easily. You can also use the exponentiation operator ^ along with e in complex data model calculations.

Direct Input of e in Excel

Using value of e
Using the value of e

You can enter the following value in any cell of your Excel worksheet:

2.71828182845904

Now, whenever you’re using the value of e in any future calculations within the workbook in different worksheets, you can refer to the cell address where you’ve entered the value. For example, B2.

e in Excel Using the EXP Function

The EXP function in Excel returns Euler’s number raised to the power of a given number. For example, to calculate e^3, you can use =EXP(3).

Using the EXP function in Excel to represent Euler’s number e is generally better than directly inputting the numerical approximation 2.71828182845904 because this value of e isn’t accurate. The decimal places keep on going just like the value of Pi.

Also, you can achieve flexibility, consistency, readability, and future-proofing by using the EXP function.

Using EXP in place of Euler's number
Using EXP in place of Euler’s number

When you need to use the value of e in any formula to calculate a value, simply input the function EXP and put the power of e in parenthesis with the EXP as shown in the above screenshot.

Create a Named Range to Use e in Excel

Another smart way to use the value of e in Excel is by creating a named range from the Name Manager tool of Excel. Then, you can use the named range in any worksheet of the workbook. The named range shows up instantly when you type the first few characters of the actual named range in any formula.

Now, there are a few advantages of using a named range rather than the actual value or e or the built-in Excel function EXP. For example, you can name the named range as EulerNumber.

if you’re presenting to a less mathematically oriented audience, the participants can easily understand by seeing the test rather than an Excel function syntax or long numerical value.

Another advantage is you can easily change the value of e centrally and Excel shall ensure that all of the calculated cells where you used the named range reflect the changes you.

Suppose, you’ve been using the value of Euler’s number up to 14 decimal places in any scientific project or financial modeling. Now, you’ve decided to use only up to 5 decimal places. Here, you just need to change the Refers to value of the EulerNumber named range.

Using named range
Using named range

Suppose, you want to use the named range of e in the above dataset. To create the named range, go to the Formulas tab and click on the Name Manager command button.

New Name dialog
New Name dialog

Click the New option on the Name Manager dialog and fill in the details as displayed above and mentioned below:

  • Name: EulerNumber
  • Scope: Workbook
  • Comment: Anything that helps you express the use of the named range
  • Refers to: 2.71828182845904
Using E as named range
Using E as the named range

When writing the formula in any cell, you can type a few letters of the named range, and a blue box shall show up in the formula suggestions. Click on that to use the Euler’s number.

Use e in Exponential Growth Calculations

Exponential growth calculation refers to the process of predicting the future value of a quantity that grows at an exponential rate over time. Exponential growth occurs when a quantity increases by a fixed percentage of its current value over a fixed period, resulting in rapid and continuous growth over time. For example, forecasting the GDP of a country, continent, or the whole world.

Sample dataset for exponential growth calculation
Sample dataset for exponential growth calculation

The example dataset I’m using is as shown above.

Using E in a formula
Using E in a formula

In D2, I’ll enter the exponential growth calculation formula created using the EXP function as given below:

=ROUND(B2*EXP(C2*A2),2)
Initial from future value
Initial from future value

The calculated GDP value in D2 shall be used as the initial GDP value for the 2nd year in B3 and so on until you reach the 10th year in B11.

Forecasting GDP using E in Excel
Forecasting GDP using E in Excel

Then, I used the fill handle in the cell E2 to drag down column E until E11 to get the future GDPs using the same formula.

So, you can see how easy it is to project the GDP value of the world after 10 years considering the rate of growth is 3.5% by using the Euler’s number in Excel.

Use e in Excel to Calculate Factorial

Factorials grow tremendously large very quickly. However, you can leverage the relationship between factorials and Euler’s number to estimate the value. While not an exact answer, it can provide a good approximation.

To find the factorial of any given number in Excel, you can use a combination function created using EXP and LN formula syntaxes.

Sample dataset for factorials
Sample dataset for factorials

Suppose, your dataset where you’d like to calculate factorials of a few given values, conforms to the above structure.

Factorial formula using E
Factorial formula using E

Then, you can enter the following formula into the cell B2:

=EXP(LN(A2 + 1))

Hit Enter to get the approximate factorial for the first value.

Using fill handle for factorial
Using fill handle for factorial

Now, drag the fill handle down the column B as far as needed to populate the factorials for the rest of the numbers.

However, this formula isn’t suitable for calculating factorials for large numbers.

Use e in Continuous Compounding Interest

Suppose you need to calculate the investment returns over 5 years for a deposit scheme where your customer would deposit $1,000 each year for 5 years. Your business shall give a return on investment of 7% for 5 years.

This is a complex dataset for calculating investment returns over a period of time. If you resort to arithmetic formulas, it would take a lot of time for you to create a model and calculate the returns.

Instead, you can use Euler’s number-based formula to calculate returns easily. The formula for continuous compounding interest is:

A=P×e^rt

Where:

  • A is the future value
  • P is the principal amount ($1,000 in this case)
  • e is Euler’s number
  • r is the annual interest rate (7%)
  • t is the time in years (5 years)
Continuous Compounding Interest
Continuous Compounding Interest

Find above the structure of your dataset should look like.

The EXP formula for A
The EXP formula for A

In the cell where you’d like to calculate the value for A in this scenario, enter the following formula and hit Enter:

=B1*EXP(B2*B3)
Continuous Compounding for A
Continuous Compounding for A

Excel shall instantly calculate the final amount you need to credit to the customer’s account after 5 years.

Use e in Exponential Distribution

The exponential distribution is one example of a probability distribution. It is often used to model the time until an event occurs in various processes. For example, the time until the next customer arrives, the time until a machine fails, etc.

In the exponential distribution, the probability density function (PDF) is given by:

f(x;λ)=λe^−λx

Where:

  • x is the random variable (time until the event occurs)
  • λ is the rate parameter (the average number of events per unit time)
Exponential Distribution dataset
Exponential Distribution dataset

Suppose, you have structured your dataset for exponential distribution calculation as given above.

Exponential Distribution formula
Exponential Distribution formula

In C3, enter the following formula and hit Enter:

=ROUND(B2*EXP(-B2*A2),4)
Using fill handle to copy formula

Now, use the fill handle to calculate PDF for the rest of the cells of column C instantly.

Use e in Excel Using VBA

To automate various actions involving the mathematical constant e in Excel, you can use Excel VBA.

Suppose, you’d like to fetch the value after raising e to the power of 3, you can use the following Excel VBA script:

VBA Script for e exponential
VBA Script for e exponential
Sub CalculateExponential()
    ' Declare variables
    Dim ExponentialValue As Double
    Dim OutputCell As Range

    ' Show an input box to enter the exponential for e
    ExponentialValue = InputBox("Please enter the exponential for e", "Input needed")

    ' Show input box to select the output cell in Excel using mouse
    On Error Resume Next ' In case the user cancels the input box
    Set OutputCell = Application.InputBox("Please select the output cell", "Select a cell", Type:=8)
    On Error GoTo 0 ' Reset error handling

    ' Check if a cell was selected
    If Not OutputCell Is Nothing Then
        ' Calculate e raised to the value of x and output it to the selected cell
        OutputCell.Value = Exp(ExponentialValue)
    End If
End Sub
Input box for exponential value
Input box for exponential value

When you execute the above script, Excel VBA shall show an input box so you can enter the exponential for e.

Input box to select a cell
Input box to select a cell

Then, you also get another input box to select the destination.

The value for e raised to 3
The value for e raised to 3

Excel shall instantly populate the value in the selected cell.

Go through the following article to find out how to create a VBA macro using the above script:

📒 Read More: How To Use The VBA Code You Find Online

Now, let’s have a look at another Excel automation where you can calculate continuous compounding interest using Excel VBA that’ll involve using e in Excel.

VBA script to get compounding interest
VBA script to get compounding interest
Sub CalculateContinuousCompoundingInterest()
    ' Declare variables
    Dim P As Double ' Principle value
    Dim r As Double ' Rate value
    Dim t As Double ' Time value
    Dim A As Double ' Calculated return
    Dim OutputCell As Range

    ' Show input boxes for P, r, and t
    P = InputBox("Please enter the principle value (P)", "Input needed")
    r = InputBox("Please enter the rate value (r) as a decimal (e.g., for 8% enter 0.08)", "Input needed")
    t = InputBox("Please enter the time value (t)", "Input needed")

    ' Calculate continuous compounding interest
    A = P * Exp(r * t)

    ' Show input box to select the output cell
    On Error Resume Next ' In case the user cancels the input box
    Set OutputCell = Application.InputBox("Please select the cell to enter the calculated return (A)", "Select a cell", Type:=8)
    On Error GoTo 0 ' Reset error handling

    ' Check if a cell was selected
    If Not OutputCell Is Nothing Then
        ' Output the calculated return to the selected cell
        OutputCell.Value = A
    End If
End Sub

This is a fully automated and interactive VBA macro. When you execute it, Excel shall do the following:

Input P
Input P
  • Show prompt to enter P
Input R
Input R
  • You also get another input box to enter r
Input T
Input T
  • Then, Excel shows the prompt to enter t
Input cell
Input cell
  • Excel asks you to highlight the destination cell for A
Continuous Compounding using VBA
Continuous Compounding using VBA

Once you do all of the above, the Excel VBA script calculates the final interest and adds that to the principle to derive the value for A.

Conclusions

So, these are all the methods to use e in Excel. When using this mathematical constant in Excel, you should follow the following two thumb rules:

  • If you use the EXP function to use e in Excel, you don’t need to use the exponential sign.
  • However, if you’re using a named range or value of e (2.71828182845904), you must use the exponential sign which is Shift + 6.

Did you benefit from any of the above use cases of Euler’s number in Excel when doing data analytics? Do you know more use cases of e in Excel? Kindly, leave your feedback or suggestions below!

About the Author

Bipasha Nath

Bipasha Nath

Bipasha is a technical content writer with 10+ years of experience in the technology industry. She previously worked in a SaaS software development company focused on SharePoint, OneDrive, Word, Excel, Word solutions.

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃