Favorites

JavaScript Math.exp() Method

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Math.exp()
JavaScript Math Static methodThis method is supported by all modern browsers.
Updated 28th November 2026

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

console.log(Math.exp(0));
console.log(Math.exp(1));
console.log(Math.exp(Math.log(10)));

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.

This method is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee