All numbers in JavaScript are actually IEEE-754 compliant floating-point doubles. These have a 53-bit mantissa which should mean that any integer value with a magnitude of approximately 9 quadrillion or less -- more specifically, 9,007,199,254,740,991 -- will be represented accurately.


NOTICE: in 2018 main browsers and NodeJS are working also with the new Javascript's primitive-type, BigInt, solving the problems with integer value magnitude.

Answer from LukeH on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Number
Number - JavaScript | MDN
A number literal like 37 in JavaScript code is a floating-point value, not an integer. There is no separate integer type in common everyday use. (JavaScript also has a BigInt type, but it's not designed to replace Number for everyday uses.
🌐
W3Schools
w3schools.com › js › js_numbers.asp
JavaScript Numbers
If you add a string and a number, the result will be a string concatenation: let x = "10"; let y = 20; let z = x + y; Try it Yourself » · A common mistake is to expect this result to be 30: let x = 10; let y = 20; let z = "The result is: " + x + y; Try it Yourself » · A common mistake is to expect this result to be 102030: let x = 10; let y = 20; let z = "30"; let result = x + y + z; Try it Yourself » · The JavaScript interpreter works from left to right.
Discussions

Number of bits in Javascript numbers - Stack Overflow
I work in Javascript with integer numbers only (mainly adding numbers and shifting them). I wonder how big they can be without loosing any bits. For example, how big X can be such that 1 More on stackoverflow.com
🌐 stackoverflow.com
JavaScript Numbers - Stack Overflow
I read on the MDN Reintroduction to JavaScript that JavaScript numbers are a floating point precision type only, and that there are no integers in JavaScript. Yet JavaScript has two functions, par... More on stackoverflow.com
🌐 stackoverflow.com
JavaScript numbers have an (adoption) problem
More langauges should have base 10 floating point numbers like C# has the Decimal data type. Sure there will be a performance pentalty, but they are so much more intuitive for people to work with. Most people will understand limitations like not being able to perfectly represent 1/3 because it's a repeating decimal in our normal everyday number system. Similar to how you can't represent the exact value of pi or e in any base. Not being able to properly represent numbers like 0.1 just causes a lot of headaches and confusion for programmers. With how common it is to use computers for financial calculations, not having a native base 10 decimal datatype seems like major feature that's missing. That's not to say that binary floating point shouldn't be there, but support for base 10 floating points should be right up there with support for strings and dates. More on reddit.com
🌐 r/programming
21
3
March 26, 2025
Numscrubber.js | Let's change values of input numbers by dragging the mouse left & right
Pretty cool! IMHO a nice addition would be to lower the sensitivity if you press shift or another key. It becomes easier to be more precise. More on reddit.com
🌐 r/javascript
10
3
December 26, 2016
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-numbers
JavaScript Numbers - GeeksforGeeks
JavaScript numbers are primitive data types, and unlike other programming languages, you don't need to declare different numeric types like int, float, etc. JavaScript numbers are always stored in double-precision 64-bit binary format IEEE 754.
Published   July 11, 2025
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Numbers_and_strings
Numbers and strings - JavaScript | MDN
This chapter introduces the two most fundamental data types in JavaScript: numbers and strings. We will introduce their underlying representations, and functions used to work with and perform calculations on them.
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › data types
Numbers
December 18, 2024 - We’re too lazy for that. We’ll try to write something like "1bn" for a billion or "7.3bn" for 7 billion 300 million. The same is true for most large numbers. In JavaScript, we can shorten a number by appending the letter "e" to it and specifying the zeroes count:
🌐
Medium
medium.com › @techwithtwin › javascript-numbers-explained-techwithtwin-704a9fbe4f4f
JavaScript Numbers Explained | TechWithTwin | by TechWithTwin | Medium
June 11, 2025 - A number is a JavaScript data type representing digits and floating-point numbers, i.e, decimals.
Find elsewhere
🌐
W3Schools
w3schools.com › js › js_number_methods.asp
JavaScript Number Methods
The valueOf() method is used internally in JavaScript to convert Number objects to primitive values.
🌐
web.dev
web.dev › learn › javascript › data-types › number
Numbers | web.dev
let tenObject = new Number( 10 ); tenObject + 5; > 15 tenObject === 10; > false · JavaScript only has one number type: 64-bit IEEE 754-1985 double precision floating-point numbers between -2^1024 and 2^1024.
🌐
Math.js
mathjs.org › docs › datatypes › numbers.html
math.js | an extensive math library for JavaScript and Node.js
Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Data_structures
JavaScript data types and data structures - JavaScript | MDN
Variables in JavaScript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types: ... let foo = 42; // foo is now a number foo = "bar"; // foo is now a string foo = true; // foo is now a boolean
🌐
DEV Community
dev.to › imsushant12 › a-guide-to-master-numbers-data-type-in-javascript-37m4
A Guide to Master Numbers Data Type in JavaScript - DEV Community
July 20, 2024 - In this article, we'll explore the various number functions in JavaScript, providing detailed explanations, examples, and comments to help you master them.
Top answer
1 of 6
8

does JavaScript abstract away the details of integers and doubles in its number type, or does JavaScript only have double precision Number types

Yes.

A JS engine may choose to optimise some uses of Number to use integer math behind the scenes, but as far as JS apps are concerned, there is only Number, and it always behaves exactly like an IEEE double-precision float.

and the functions parseInt and parseFloat are poorly named?

Arguably, but parseFloatThatHappensToBeAWholeNumber would be a bit unwieldy. :-)

2 of 6
2

The MDN reference is pretty good, there's nothing in these answers that isn't in that article. I suggest you read ECMA-262 4.3.19 to 21 to understand the difference between a number value, a number Type and a number Object (and probably the whole section to understand Types in general).

An important aspect of javascript is that it is not strongly typed. There is no floating point precision type, nor is there an integer type. There are values, Types and Objects.

Variables don't have a type, their values do. You can assign a value to a variable, and that value can have a Type of String, Number, Boolean, etc. Don't get confused between Types and Objects - you can't specify that a variable has a particular Type, you can only assign it a value that has a Type. e.g.

Copyvar num = '5'; // the value of num is a String Type
num = +num;    // its value is now a Number Type
num = num/2;   // its value is still a Number Type
               // but if printed looks like a float (2.5)

There is a Number object too (though rarely used) and javascript handily converts number primitives to objects for the sake of evaluating expressions:

Copy(5).toString();  // 5 is converted to a Number object
                 // its toString method is called, returning '5'

In the above, the grouping operator is required as otherwise the 'dot' will be interpreted as a decimal place and the following 't' as a syntax error. It is essentially the reverse of parseInt.

The parseInt and parseFloat methods are used to convert a string Type value to a number Type value as shown in the MDN article. There are other methods, such as:

Copyvar num = '5';    // string Type
var x = num * 2;  // number Type

Variable x has a number Type value because multiplication will convert the string value of num to a number before doing multiplication.

Copyvar y = x + 'px';  // string Type

The '+' operator is overloaded - because one of the terms in the expression is a string, it will be treated as a concatenation operator so x will be converted to a string Type, 'px' will be concatenated and the string '10px' will be assigned to y, so its value is a string Type.

Read relevant parts of ECMA-262, it explains how it all works in detail.

🌐
Progress
progress.com › blogs › limitations-number-type-javascript
Limitations of the Number Type in JavaScript
September 15, 2021 - In Javascript, the number type is used to represent all numbers like integers and decimals (123 or 123.45).
🌐
Reddit
reddit.com › r/programming › javascript numbers have an (adoption) problem
r/programming on Reddit: JavaScript numbers have an (adoption) problem
March 26, 2025 - That's how you kill two birds with one stone: always use integers, use BigInt in JavaScript, and when you (oh gosh) need to multiply numbers, you'll have to perform a truncating division to produce a usable result, and then you'll have to consider rounding because you can't just ignore it until it becomes a problem in prod.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Scripting › Math
Basic math in JavaScript — numbers and operators - Learn web development | MDN
For a start, we are just going to stick to decimal numbers throughout this course; you'll rarely come across a need to start thinking about other types, if ever. The second bit of good news is that unlike some other programming languages, JavaScript only has one data type for numbers, both integers and decimals — you guessed it, Number.
🌐
Medium
medium.com › @vincentcorbee › lets-talk-numbers-in-javascript-72ffe1eb1f3f
Let’s talk numbers…. in Javascript | by Vincentcorbee | Medium
February 12, 2023 - Let’s talk numbers…. in Javascript Remember the first time you had seen: 0.1 + 0.2 = 0.30000000000000004 and thought wtf Javascript have you been dropped on the floor as a baby? 0.1 + 0.2 = 0.3 …
🌐
Numbers
numbers.github.io
numbers.js: JavaScript's most popular math library
numbers.js is an advanced mathematics library written in and for JavaScript.
🌐
TutorialsTeacher
tutorialsteacher.com › javascript › javascript-number
JavaScript Numers: Integer, Float, Binary, Exponential, Hexadecimal, Octal
The Number is a primitive data type used for positive or negative integer, float, binary, octal, hexadecimal, and exponential values in JavaScript.