JavaScript Math.asinh() Method

Definition
Math.asinh(x) returns the inverse hyperbolic sine of a number. It is the reverse of Math.sinh(). Unlike asin(), it accepts any number.
Math is built into JavaScript. Call the method directly. It is not a constructor, so never write new Math().
Syntax
Call Math.asinh() like this. Start with this line.
| Call | What it does |
|---|
Math.asinh(x) | Returns the inverse hyperbolic sine of x. |
Built into JavaScript. Call Math.asinh() on the Math object — no import required.
Library declarations
interface Math {
asinh(x: number): number;
}
Parameters
| Parameter | Description |
|---|
| x | Required. A number. Other values are converted to a number first. |
Return Value
| Return Value | Description |
|---|
| number | The inverse hyperbolic sine of x. Returns NaN if x cannot be turned into a number. |
JavaScript Examples
Example 1 — Basic Use
Any number is allowed.
console.log(Math.asinh(0)); // 0
console.log(Math.asinh(1)); // 0.881373587019543
console.log(Math.asinh(-1)); // -0.881373587019543
console.log(Math.asinh(100)); // 5.298342365610589
0
0.881373587019543
-0.881373587019543
5.298342365610589
How It Works
- Zero.
Math.asinh(0) is 0. - Positive.
Math.asinh(1) is about 0.8814. - Negative.
-1 gives the same number with a minus sign. - Big numbers. The result grows slowly, even for
100.
Example 2 — Negative Input, Negative Result
Flipping the sign of the input flips the sign of the result.
var x = 2.5;
console.log(Math.asinh(x)); // 1.6472311463710958
console.log(Math.asinh(-x)); // -1.6472311463710958
console.log(Math.asinh(-x) === -Math.asinh(x)); // true
1.6472311463710958
-1.6472311463710958
true
How It Works
- Positive.
Math.asinh(2.5) is a positive number. - Negative.
Math.asinh(-2.5) is the same number, but negative. - Compare. The strict check returns
true. This is called an odd function.
Example 3 — Check With the Log Formula
Compare Math.asinh() with the formula.
function asinhFormula(x) {
return Math.log(x + Math.sqrt(x * x + 1));
}
console.log(Math.asinh(3).toFixed(6)); // 1.818446
console.log(asinhFormula(3).toFixed(6)); // 1.818446
console.log(Math.asinh(Math.sinh(2)).toFixed(6)); // 2.000000
How It Works
- Formula. The inverse hyperbolic sine is
ln(x + √(x² + 1)). - Same result. Both lines print the same value.
- Undo sinh.
Math.asinh(Math.sinh(2)) brings back 2.
Compatibility
Browser & Runtime Support
Math.asinh() is part of ES2015 and is Baseline Widely available in modern browsers and Node.js.
✓ Baseline · ES2015
Math.asinh()
Supported in Chrome, Firefox, Safari, Edge, and Node.js for years. Safe for modern apps without a polyfill.
98% Modern browser support
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full supportMath.asinh Excellent
Bottom line: Use Math.asinh() in new code. Only very old browsers, like Internet Explorer, lack it.
Frequently Asked Questions
Math.asinh(x) returns the inverse hyperbolic sine of x. It reverses Math.sinh(). Math.asinh(0) is 0.
No. Unlike Math.asin(), it works for every number, positive or negative.
Math.asinh(x) equals Math.log(x + Math.sqrt(x * x + 1)).
It returns the negative of the positive result. Math.asinh(-1) is -0.881373587019543 because Math.asinh(1) is 0.881373587019543.
It was added in ES2015 and works in all modern browsers and Node.js.
About the author
Developer, cloud engineer, and technical writer
I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.
12 people found this page helpful