Open links in new tab
  1. JavaScript

    High-level programming language
  2. Math - JavaScript | MDN - MDN Web Docs

    • Learn how to use the Math namespace object to perform various mathematical operations and calculations in JavaScript. See the list of static properties and methods, examples, and browser compatibility fo… See more

    Overview

    The Math namespace object contains static properties and methods for mathematical constants and functions.

    Mozilla Developer
    Description

    Unlike most global objects, Math is not a constructor. You cannot use it with the new operator or invoke the Math object as a function. All properties and methods of Math are static.

    Mozilla Developer
    Static properties

    Math.E
    Euler's number and the base of natural logarithms; approximately 2.718.
    Math.LN10

    Mozilla Developer
    Feedback
  1. The JavaScript Math object provides a collection of properties and methods for performing mathematical tasks on numbers. Unlike other objects, the Math object is static, meaning you don't need to create an instance of it to use its properties and methods.

    Math Properties

    JavaScript provides several mathematical constants that can be accessed as properties of the Math object. Some of these include:

    • Math.PI: Returns the value of Ď€ (approximately 3.14159).

    • Math.E: Returns Euler's number (approximately 2.718).

    • Math.SQRT2: Returns the square root of 2 (approximately 1.414).

    • Math.LN2: Returns the natural logarithm of 2 (approximately 0.693).

    • Math.LOG10E: Returns the base-10 logarithm of E (approximately 0.434).

    Math Methods

    The Math object provides various methods for performing mathematical operations. Here are some commonly used methods:

    Rounding Methods

    Feedback
  2. JavaScript Math Object - W3Schools

    The Math Object The JavaScript Math object allows you to perform mathematical tasks. The Math object is static. All methods and properties can be used without creating a Math object first.

  3. JavaScript Math Object - GeeksforGeeks

    Jul 11, 2025 · JavaScript Math object is used to perform mathematical operations on numbers. All the properties of Math are static and unlike other objects, it does not have a constructor.

  4. Math - The complete JavaScript Tutorial

    When you need to do more complex mathematical operations than the ones we have already discussed, like basic addition, subtraction, multiplications and so on, then you will quickly appreciate the built-in …

  5. JavaScript Math Functions Explained - freeCodeCamp.org

    Jan 18, 2020 · Learn how to use the Math object and its methods to perform various mathematical operations in JavaScript. See examples of pi, pow, sqrt, trunc, ceil, …

  6. JavaScript - Math - Online Tutorials Library

    The JavaScript math object provides properties and methods for mathematical constants and functions. Unlike other global objects, Math is not a constructor. All …

  7. JavaScript Math Reference - W3Schools

    43 rows · Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.

  8. Basic math in JavaScript — numbers and operators - MDN Web Docs

    Aug 18, 2025 · Learn how to use numbers, operators, and methods to perform calculations in JavaScript. This article covers the basics of decimal numbers, arithmetic operators, and the Math …

  9. JavaScript Math Object: A Comprehensive Guide - tutorialpedia.org

    In JavaScript, the Math object is a built - in object that provides a collection of mathematical functions and constants. It serves as a powerful tool for performing various mathematical operations, such as …

  10. JavaScript Math Object Explained with Methods and …

    Jun 22, 2025 · The Math Object in JavaScript is a powerful and reliable toolbox for working with numbers. From rounding decimals to generating random values and …

  11. People also ask
    Loading
    Unable to load answer