 Home >>JavaScript Math Reference

# JavaScript Math Reference

## JavaScript Math Reference

### Math Object Properties

Property Description
E It is used to return Euler's number.
LN2 It is used to return the natural logarithm of 2.
LN10 It is used to return the natural logarithm of 10.
LOG2E It is used to return the base-2 logarithm of E.
LOG10E It is used to return the base-10 logarithm of E.
PI It is used to return PI.
SQRT1_2 It is used to return the square root of ½.
SQRT2 It is used to return the square root of 2.

### Math Object Methods

Method Description
abs(x) It is used to return the absolute value of x.
acos(x) It is used to return the arccosine of x in radians.
acosh(x) It is used to return the hyperbolic arccosine of x.
asin(x) It is used to return the arcsine of x in radians.
asinh(x) It is used to return the hyperbolic arcsine of x.
atan(x) It is used to return the arctangent of x as a numeric value between -PI/2 and PI/2 radians.
atan2(y, x) It is used to return the arctangent of the quotient of its Argument.
atanh(x) It is used to return the hyperbolic arctangent of x.
cbrt(x) It is used to return the cubic root of x.
ceil(x) It is used to return rounded upwards valoe of x to the nearest Integer.
cos(x) It is used to return the cosine of x.
cosh(x) It is used to return the hyperbolic cosine of x.
exp(x) It is used to return the value of ex.
floor(x) It is used to return rounded downwards value of x to the nearest Integer.
log(x) It is used to return the natural logarithm of x.
max(x, y, z, ..., n) It is used to return the number with the highest value.
min(x, y, z, ..., n) It is used to return the number with the lowest value.
pow(x, y) It is used to return the value of x to the power of y.
random() It is used to return a random number between 0 and 1.
round(x) It is used to round x to the nearest integer.
sin(x) It is used to return the sine of x.
sinh(x) It is used to return the hyperbolic sine of x.
sqrt(x) It is used to return the square root of x.
tan(x) It is used to return the tangent of an angle.
tanh(x) It is used to return the hyperbolic tangent of a number
trunc(x) It is used to return the integer part of a number.

## JavaScript Math Reference Index

Sr.No. Topics
1 JavaScript E Property
2 JavaScript LN2 Property
3 JavaScript LN10 Property
4 JavaScript LOG2E Property
5 JavaScript LOG10E Property
6 JavaScript PI Property
7 JavaScript SQRT1_2 Property
8 JavaScript SQRT2 Property
9 JavaScript abs() Method
10 JavaScript acos() Method
11 JavaScript acosh() Method
12 JavaScript asin() Method
13 JavaScript asinh() Method
14 JavaScript atan() Method
15 JavaScript atan2() Method
16 JavaScript atanh() Method
17 JavaScript cbrt() Method
18 JavaScript ceil() Method
19 JavaScript cos() Method
20 JavaScript cosh() Method
21 JavaScript exp() Method
22 JavaScript floor () Method
23 JavaScript log() Method
24 JavaScript max() Method
25 JavaScript min()  Method
26 JavaScript pow() Method
27 JavaScript random() Method
28 JavaScript round() Method
29 JavaScript sin() Method
30 JavaScript sinh() Method
31 JavaScript sqrt() Method
32 JavaScript tan() Method
33 JavaScript tanh() Method
34 JavaScript trunc() Method