JavaScript Math
Math functions for calculations — random, round, sqrt, floor, and more. This category documents 43 JavaScript math entries, and each page gives you the full syntax, the parameter list, the return value, a runnable example, time complexity, the TypeScript signature, and the mistakes developers most often make with that API. The entries are: Math.abs(), Math.ceil(), Math.floor(), Math.round(), Math.trunc(), Math.max(), Math.min(), Math.random(), Math.sqrt(), Math.cbrt(), Math.pow(), Math.hypot(), Math.sign(), Math.sin(), Math.cos(), Math.tan(), Math.asin(), Math.acos(), Math.atan(), Math.atan2(), Math.exp(), Math.log(), Math.log2(), Math.log10(), Math.PI, Math.E, Math.SQRT2, Math.imul(), Math.clz32(), Math.fround(), Math.acosh(), Math.asinh(), Math.atanh(), Math.cosh(), Math.sinh(), Math.tanh(), Math.expm1(), Math.log1p(), Math.SQRT1_2, Math.LN2, and more. For a structured walkthrough of the whole topic, read the Math guide. Not sure which method you need? Math.abs() and Math.ceil() are the most commonly used starting points in this category. You can also search across every category from the search page or browse the complete A–Z index.