Calculating e using the compound formula

Up a level : Euler's number e
Previous page : The function e^x

From a previous page we have that

e=\displaystyle \underset{{n\to \infty }}{\mathop{{\lim }}}\,{{\left( {1+\frac{1}{n}} \right)}^{n}}

So, can we use this to calculate e? Yes, we can, even though it is not the most efficient method.  You may try it out here:

JavaScript cannot work with big decimal numbers, so what is done in to work with the built in BigInt data type. In this case the calculations are done using 505 digit integers. The integers are scaled using a constant tenEn = 10505. This number is now the one in the calculations.

When running the calculations, you will see successive approximations using bigger and bigger values for n. We step forward so that we se every n=2m step. The reason why n is a power of two is because it is easy to calculate the numbers by successive squaring.

First 1+1/n is calculated, then this number is squared m times to get the result.

Only the correct digits are shown.

You may start (restart) the calculations, do single step calculations or continue the calculations at speed. One step takes 40 ms or more.

As m gets bigger and bigger the result gets better and better, until 1/2m will reach up to about half of the available digits. After that 1/2m will get fewer and fewer significant figures. This because we have a one in the beginning  of the number.  We have 1+1/n, so we get 1.00000… then some digits up to the number of available digits.

Up a level : Euler's number e
Previous page : The function e^xLast modified: Apr 20, 2026 @ 06:58