number.toExponential() returns a string of the number in exponential (scientific) notation: one digit before the decimal, then e+ or e- and an exponent. Useful for very large or very small values.
Pass the required arguments shown below. Check return values and browser support before you rely on the result.
Syntax
Call number.toExponential. Start with this line.
JavaScript
n.toExponential([fractionDigits])
Call
What it does
n.toExponential([fractionDigits])
Primary signature.
number.toExponential(...)
Call with the arguments your case needs.
Built into JavaScript. Call toExponential(...) on a number (or Number instance) — no import required.
Library declarations
JavaScript
n.toExponential([fractionDigits])
Parameters
Parameter
Description
fractionDigits
Optional. Digits after the decimal (0–100)
Return Value
Return Value
Description
*
Exponential notation string
JavaScript Examples
Example 1 — Default Exponential Form
Omit the argument to keep as many digits as needed.
Parse back.Number("1.23e+5") yields a number again.
Rounding note. With only two digits, you get 123000, not the full original.
Compatibility
Browser & Runtime Support
Number.prototype.toExponential() is part of core JavaScript (ES3+) and is Baseline Widely available.
✓ Baseline · ES3+
Number.toExponential()
Supported in every browser and Node.js version. No polyfill needed for scientific-notation formatting.
99%Universal support
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
toExponentialExcellent
Bottom line: Safe everywhere. Use freely for scientific display; prefer toFixed for plain fixed decimals.
Frequently Asked Questions
Number.prototype.toExponential() returns a string of the number in exponential (scientific) notation — one digit before the decimal point, then an e+ or e- exponent. Example: (77.1234).toExponential() is "7.71234e+1".
fractionDigits is an optional integer from 0 to 100 that sets how many digits appear after the decimal point. If you omit it, JavaScript uses as many digits as needed to represent the number. Values outside 0–100 throw a RangeError.
toExponential() always uses scientific notation. toFixed() uses fixed decimal places in plain form. toPrecision() picks a total significant-digit count and may use either plain or exponential form depending on the value.
Like other Number methods, (77).toExponential() needs parentheses (or a space) so the parser does not treat the dot as a decimal point. 77.toExponential() is a syntax error.
Yes. Number() or Number.parseFloat() accept strings like "1.23e+5". That is useful when you format for display, then parse again for math.
It is part of early ECMAScript and is Baseline Widely available — safe in every modern browser and Node.js.