JavaScript Math.exp() Method
The Math.exp() static method returns e (Euler's number) raised to a given power.
Description
The Math.exp() static method returns ex, where e is Euler's number. It's the inverse of Math.log() and is used for exponential growth and decay.
For very large arguments the result overflows to Infinity, and for very negative ones it approaches 0. When x is very close to zero, Math.expm1(x), which returns ex - 1, is more accurate than subtracting 1 yourself.
Exponential functions are used for compound growth, decay curves, probability distributions and smooth easing in animations. Like every member of Math, it's called on the Math object itself rather than on a number, and it only works with the Number type: passing a BigInt throws a TypeError.
Syntax
Math.exp(x)Parameters
- xA number.
Return Value
e raised to the power of x.
Example
Browser Support
The following information will show you the current browser support for the Math.exp() method. Hover over a browser icon to see the version that first introduced support for this method.
Desktop





Tablets & Mobile





