JavaScript Math.acosh() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Math

Definition

Math.acosh(x) returns the inverse hyperbolic cosine of a number. It is the reverse of Math.cosh(). The input must be 1 or greater.

Math is built into JavaScript. Call the method directly. It is not a constructor, so never write new Math().

Syntax

Call Math.acosh() like this. Start with this line.

JavaScript
Math.acosh(x)
CallWhat it does
Math.acosh(x)Returns the inverse hyperbolic cosine of x.

Built into JavaScript. Call Math.acosh() on the Math object — no import required.

Library declarations
JavaScript
Math.acosh(x)
JavaScript
interface Math {
  acosh(x: number): number;
}

Parameters

ParameterDescription
xRequired. A number that is 1 or greater. Smaller numbers return NaN.

Return Value

Return ValueDescription
numberThe inverse hyperbolic cosine of x (0 or greater). Returns NaN if x is less than 1.

JavaScript Examples

Example 1 — Basic Use

Pass a number that is 1 or greater.

JavaScript
console.log(Math.acosh(1));    // 0
console.log(Math.acosh(2));    // 1.3169578969248166
console.log(Math.acosh(10));   // 2.993222846126381
console.log(Math.acosh(0.5));  // NaN
Try It Yourself

How It Works

  1. Start at 1. Math.acosh(1) is 0. This is the smallest valid input.
  2. Grows slowly. The result grows slowly as x gets bigger.
  3. Below 1. 0.5 is not valid, so the result is NaN.

Example 2 — Undo Math.cosh()

acosh() reverses cosh(). Round the answer to hide tiny floating-point errors.

JavaScript
var x = 2;
var y = Math.cosh(x);
console.log(y);                               // 3.7621956910836314
console.log(Math.acosh(y).toFixed(6));        // 2.000000
console.log(Math.acosh(Math.cosh(3)).toFixed(6)); // 3.000000
Try It Yourself

How It Works

  1. Go forward. Math.cosh(2) is about 3.7622.
  2. Go back. Math.acosh(3.7622...) returns the original 2.
  3. Round. toFixed(6) removes tiny rounding noise from the last digits.

Example 3 — Check With the Log Formula

Compare Math.acosh() with the math formula to see they match.

JavaScript
function acoshFormula(x) {
  return Math.log(x + Math.sqrt(x * x - 1));
}

console.log(Math.acosh(5).toFixed(6));   // 2.292432
console.log(acoshFormula(5).toFixed(6)); // 2.292432
Try It Yourself

How It Works

  1. Write the formula. The inverse hyperbolic cosine is ln(x + √(x² - 1)).
  2. Compare. Both lines print the same value to six decimals.
  3. Use the built-in. Math.acosh() is shorter and handles edge cases for you.

Browser & Runtime Support

Math.acosh() is part of ES2015 and is Baseline Widely available in modern browsers and Node.js.

✓ Baseline · ES2015

Math.acosh()

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

Bottom line: Use Math.acosh() in new code. Only very old browsers, like Internet Explorer, lack it.

Frequently Asked Questions

Math.acosh(x) returns the inverse hyperbolic cosine of x. It is the reverse of Math.cosh(). Math.acosh(1) is 0.
The hyperbolic cosine is never less than 1, so there is no answer for inputs below 1. The result is NaN.
Math.acosh(x) equals Math.log(x + Math.sqrt(x * x - 1)) for x of 1 or more.
No. Math.acos() is the inverse of the normal cosine and works with angles. Math.acosh() is the inverse of the hyperbolic cosine.
It was added in ES2015 and works in all modern browsers and Node.js.

Next: asin()

Learn how to find the arc sine of a number.

asin() 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.

10 people found this page helpful