JavaScript Math.sinh() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Method

Definition

Math.sinh(x) returns the hyperbolic sine of a number. It is calculated as (ex - e-x) / 2. It is different from Math.sin(), which works with angles.

Read the syntax below, then try the three examples to see the method in action.

Syntax

Call the method on Math. Start with this line.

JavaScript
Math.sinh(x)
CallWhat it does
Math.sinh(x)Returns the hyperbolic sine of x.

Built into JavaScript. Call Math.sinh(...) on the Math object — no import required. Math is not a constructor, so never write new Math().

Library declarations
JavaScript
Math.sinh(x)

Parameters

ParameterDescription
xRequired. Any number.

Return Value

Return ValueDescription
NumberThe hyperbolic sine of x. Returns NaN if x is not a number.

JavaScript Examples

Example 1 — Basic Hyperbolic Sine Values

Try zero, a positive number and a negative number.

JavaScript
console.log(Math.sinh(0)); // 0
console.log(Math.sinh(1)); // 1.1752011936438014
console.log(Math.sinh(-1)); // -1.1752011936438014
Try It Yourself

How It Works

  1. Zero. Math.sinh(0) is 0.
  2. Positive. Math.sinh(1) is about 1.1752.
  3. Negative. The same number with a minus sign, because sinh is an odd function.
  4. Not an angle. The input is a plain number, not radians.

Example 2 — Check the Formula with Math.exp()

Build sinh by hand with Math.exp() and compare it.

JavaScript
const x = 2;
const viaMath = Math.sinh(x);
const viaFormula = (Math.exp(x) - Math.exp(-x)) / 2;

console.log(viaMath); // 3.626860407847019
console.log(viaFormula.toFixed(10)); // 3.6268604078
console.log(viaMath.toFixed(10)); // 3.6268604078
Try It Yourself

How It Works

  1. Built-in. Math.sinh(2) gives the answer directly.
  2. By hand. (e2 - e-2) / 2 is written with Math.exp().
  3. Compare. Both match to 10 decimal places.
  4. Why use sinh? Math.sinh() is shorter and more accurate for numbers close to zero.

Example 3 — Odd Function, Large Numbers and NaN

See how sinh mirrors around zero, explodes for big numbers and handles bad input.

JavaScript
console.log(Math.sinh(-3) === -Math.sinh(3)); // true
console.log(Math.sinh(Infinity)); // Infinity
console.log(Math.sinh(-Infinity)); // -Infinity
console.log(Math.sinh("abc")); // NaN
Try It Yourself

How It Works

  1. Mirror. sinh(-3) is exactly -sinh(3), so the check is true.
  2. Infinity. Math.sinh(Infinity) is Infinity.
  3. Negative infinity. The result keeps the minus sign.
  4. Bad input. "abc" becomes NaN.

Browser & Runtime Support

Math.sinh was added in ES2015 and is Baseline Widely available in modern browsers and Node.js. It does not work in Internet Explorer.

✓ Baseline · ES2015

Math.sinh

Supported in Chrome, Firefox, Safari, Edge and Node.js for years. Only very old browsers such as Internet Explorer lack it.

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 support
Math.sinh Excellent

Bottom line: Use Math.sinh in modern code. Add a small polyfill only if you must support Internet Explorer.

Frequently Asked Questions

It returns the hyperbolic sine of a number, calculated as (e^x - e^-x) / 2.
No. Math.sin() works with angles in radians and stays between -1 and 1. Math.sinh() works with any number and can be very large.
It is 0.
It returns Infinity. Math.sinh(-Infinity) returns -Infinity.
Math.asinh() is the inverse. It takes a number and gives back the original input to sinh.
All modern browsers and Node.js. It was added in ES2015. Internet Explorer does not support it.

Next: sqrt()

Learn about square root of a number.

sqrt() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

9 people found this page helpful