JavaScript Number Methods

Beginner
6 min read
Updated: Nov 2026
10 method guides
Method index

About This Index

This page is the JavaScript Number Methods index for the tutorial track. Each row links to a full guide with syntax, examples, and FAQs.

Learn what a Number is on /js/number. Use this page when you need a specific API such as toFixed(), toString(), or isInteger().

Beginner path.

Start with toFixed(), toString(), isInteger(), and parseInt()—then browse the rest by category.

How to Call a Number Method

Instance methods use a dot; static helpers use Number:

JavaScript
const n = 3.14159;
const rgb = 255;

// Instance (Number.prototype)
n.toFixed(2);        // "3.14"
rgb.toString(16);    // "ff"
n.toPrecision(3);    // "3.14"
n.toExponential(2);  // "3.14e+0"

// Static (on Number)
Number.isInteger(5);       // true
Number.isNaN(NaN);         // true
Number.parseInt("42", 10); // 42
Number.parseFloat("3.14"); // 3.14

JavaScript Number Methods Table

All method guides in this JavaScript tutorial series (10 tutorials).

Convert to String

4 methods

Turn numbers into text for display, fixed decimals, significant digits, scientific notation, colors, and base conversion.

MethodDescriptionTutorial
toString()Return a string for a number in base 2–36 — default decimal, binary/hex via radix, keeps the minus sign for negatives.Try it
toExponential()Format a number in exponential (scientific) notation — optional fractionDigits 0–100 for mantissa precision.Try it
toFixed()Format a number with a fixed count of decimal places — rounds, pads zeros, returns a display string.Try it
toPrecision()Format a number to a chosen count of significant digits — may use plain or exponential form.Try it

Static Methods

6 methods

Call on Number itself (not on number instances) to inspect, validate, or parse values.

MethodDescriptionTutorial
isFinite()Static check: return true only for finite number values — no coercion, rejects Infinity, NaN, and non-numbers.Try it
isInteger()Static check: return true only for integer number values — no coercion, rejects floats, Infinity, NaN, and non-numbers.Try it
isNaN()Static check: return true only for the number value NaN — no coercion, safer than global isNaN().Try it
isSafeInteger()Static check: return true only for integers in the MAX_SAFE_INTEGER / MIN_SAFE_INTEGER range — no coercion.Try it
parseInt()Static parse: turn a string into an integer with optional radix 2–36 — same as global parseInt.Try it
parseFloat()Static parse: turn a string into a floating-point number — keeps decimals, same as global parseFloat.Try it

Frequently Asked Questions

Number methods include instance formatters on Number.prototype (toString, toFixed, toPrecision, toExponential) and static helpers on Number itself such as Number.isFinite(), Number.isInteger(), Number.isNaN(), Number.parseInt(), and Number.parseFloat().
The Number page teaches what a Number is—literals, Number(), typeof, NaN, and Infinity. This Methods index lists every method tutorial so you can open toFixed(), toString(), isInteger(), and the rest.
Instance methods use a dot on a number: (3.14159).toFixed(2), (255).toString(16). Static methods use Number: Number.isInteger(5), Number.parseFloat("3.14").
No. Numbers are immutable. Formatting methods return a new string; checks return a boolean. Assign the result if you need to keep it.
If you are new, read JavaScript Number first. Then open toFixed(), toString(), isInteger(), and parseInt() from the table below.

Start with toFixed()

Open the formatting guide—syntax, examples, and FAQs.

toFixed() 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