Math.LN2 - JavaScript - MDN Web Docs

  • Skip to main content
  • Skip to search
Math.LN2 Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

  • Learn more
  • See full compatibility
  • Report feedback

The Math.LN2 static data property represents the natural logarithm of 2, approximately 0.693:

In this article

  • Try it
  • Value
  • Description
  • Examples
  • Specifications
  • Browser compatibility
  • See also

Try it

function getNatLog2() { return Math.LN2; } console.log(getNatLog2()); // Expected output: 0.6931471805599453

Value

𝙼𝚊𝚝𝚑.𝙻𝙽𝟸=ln(2)≈0.693\mathtt{Math.LN2} = \ln(2) \approx 0.693
Property attributes of Math.LN2
Writableno
Enumerableno
Configurableno

Description

Because LN2 is a static property of Math, you always use it as Math.LN2, rather than as a property of a Math object you created (Math is not a constructor).

Examples

Using Math.LN2

The following function returns the natural log of 2:

jsfunction getNatLog2() { return Math.LN2; } getNatLog2(); // 0.6931471805599453

Specifications

Specification
ECMAScript® 2026 Language Specification# sec-math.ln2

Browser compatibility

See also

  • Math.exp()
  • Math.log()
  • Math.log2()

Help improve MDN

Was this page helpful to you? Yes No Learn how to contribute

This page was last modified on Jul 10, 2025 by MDN contributors.

View this page on GitHub • Report a problem with this content Filter sidebar
  1. Standard built-in objects
  2. Math
  3. Static methods
    1. abs()
    2. acos()
    3. acosh()
    4. asin()
    5. asinh()
    6. atan()
    7. atan2()
    8. atanh()
    9. cbrt()
    10. ceil()
    11. clz32()
    12. cos()
    13. cosh()
    14. exp()
    15. expm1()
    16. f16round()
    17. floor()
    18. fround()
    19. hypot()
    20. imul()
    21. log()
    22. log1p()
    23. log2()
    24. log10()
    25. max()
    26. min()
    27. pow()
    28. random()
    29. round()
    30. sign()
    31. sin()
    32. sinh()
    33. sqrt()
    34. sumPrecise()
    35. tan()
    36. tanh()
    37. trunc()
  4. Static properties
    1. E
    2. LN2
    3. LN10
    4. LOG2E
    5. LOG10E
    6. PI
    7. SQRT1_2
    8. SQRT2

Từ khóa » Sinh(ln2)