Perform exact arithmetic on numbers with hundreds or thousands of digits using JavaScript BigInt. Supports addition, subtraction, multiplication, integer division, exponentiation, and factorial β far beyond IEEE 754 limits.
Standard computer arithmetic has a dirty secret: numbers larger than 9,007,199,254,740,991 (2^53 β 1) cannot be represented exactly as 64-bit floating-point doubles. Add 1 to this number in JavaScript and you still get 9,007,199,254,740,992 β then add 1 again and it jumps to 9,007,199,254,740,994, silently skipping odd numbers entirely. For financial calculations, cryptography, combinatorics, and scientific computing, this is completely unacceptable.
This big number calculator uses JavaScript's BigInt type to perform exact arithmetic on integers of any size β hundreds or even thousands of digits β with no approximation whatsoever.
IEEE 754 double-precision floating-point β the format used by virtually every modern CPU and programming language by default β stores numbers using 64 bits: 1 sign bit, 11 exponent bits, and 52 mantissa bits. The mantissa can represent integers exactly up to 2^53 (about 9 quadrillion). Beyond this, numbers must be rounded to the nearest representable value.
This is fine for scientific calculations where a small relative error is acceptable. But for integer arithmetic β counting, cryptography, combinatorics β even a single-digit error is catastrophic. Consider calculating RSA keys, computing exact factorials for statistical proofs, or verifying very large checksums: you need every digit to be correct.
JavaScript's BigInt type (introduced in ES2020, now supported in all modern browsers) stores integers as arbitrary-length binary values. There is no maximum size other than available memory. BigInt operations (+, β, Γ, Γ·) are exact for integers.
Some notes on BigInt:
To put large numbers in context, here are some famous large numbers and their digit counts:
| Number | Value / Definition | Digits |
|---|---|---|
| Avogadro's number | 6.022 Γ 10^23 | 24 |
| 2^53 (JS safe int) | 9,007,199,254,740,992 | 16 |
| RSA-2048 key | ~2^2048 | 617 |
| Googol | 10^100 | 101 |
| 100! | ~9.33 Γ 10^157 | 158 |
| Googolplex | 10^(10^100) | 10^100 digits |
| 2^1000 | ~1.07 Γ 10^301 | 302 |
| 170! | ~7.26 Γ 10^306 | 307 |
A googol is 10^100 β a 1 followed by 100 zeros. The word was invented in 1938 by 9-year-old Milton Sirotta, nephew of mathematician Edward Kasner, who was trying to find a name for a very large but finite number. Google (the company) named itself after this number to suggest the vast amount of information the search engine would organize.
A googolplex is 10^(googol) β that is, 10^(10^100). The number of digits in a googolplex is itself a googol. There are not enough atoms in the observable universe (about 10^80) to write out all the digits of a googolplex even if each atom could hold one digit.
Our calculator can compute googol (10^100) exactly. It cannot compute googolplex β the result would have more digits than there are atoms in the universe.
RSA encryption β used to secure every HTTPS connection, email, and online banking transaction β depends entirely on large number arithmetic. An RSA-2048 key is a product of two 1024-bit prime numbers. This product has about 617 decimal digits. The security of RSA depends on the fact that factoring a 617-digit number is computationally infeasible with current technology.
RSA-4096 keys (used for higher security) involve numbers with about 1,234 digits. RSA-8192 (sometimes used for extremely long-term security) would involve numbers exceeding 2,466 digits. BigInt arithmetic handles all of these sizes easily, though operations on very large numbers take more time than small ones.
Factorials grow faster than exponentials. 100! has 158 digits. 1000! has 2,568 digits. The number of ways to shuffle a deck of 52 cards (52!) is a 68-digit number β larger than the number of atoms in the Milky Way galaxy.
When computing combinations and permutations for very large n, floating-point arithmetic fails completely. BigInt gives exact counts, which matter in statistical proofs, lottery analysis, and cryptographic key space calculations.
The observable universe contains approximately 10^80 atoms. The number of Planck volumes (the smallest meaningful unit of volume) in the observable universe is about 10^185. These numbers have 81 and 186 digits respectively β easily handled by BigInt arithmetic.
Avogadro's number (6.02214076 Γ 10^23 β the number of particles in one mole of substance) is a fundamental constant in chemistry. Exact calculations involving molar quantities at the particle level benefit from BigInt precision.
JavaScript's standard Number type uses 64-bit IEEE 754 floating-point, which can represent integers exactly only up to 2^53 β 1 (about 9 quadrillion). Beyond this, numbers are rounded. For example, 9007199254740992 + 1 equals 9007199254740992 in standard JavaScript β the 1 is lost.
BigInt is a JavaScript numeric type that stores integers of arbitrary size with exact precision. It uses a suffix 'n' in code (e.g., 123n). BigInt supports +, β, Γ, Γ·, ** (power), and % operations. It cannot be mixed with regular Numbers without explicit conversion.
A googol is 10^100 β a 1 followed by 100 zeros. It was coined in 1938 by a 9-year-old and is useful as a benchmark for "astronomically large" finite numbers. Google named itself after googol to suggest vast scale.
100! has 158 digits. The exact value begins with 9332621... and ends in 24 trailing zeros. You can compute it exactly with our factorial calculator.
An RSA-2048 key is the product of two ~1024-bit prime numbers, resulting in a number with about 617 decimal digits. RSA-4096 produces ~1,234-digit numbers. These are computed using big number arithmetic libraries.
Theoretically, there is no limit β BigInt can store integers of any size. In practice, very large numbers slow the browser. Addition and subtraction of 10,000-digit numbers are fast. Multiplication of 1,000-digit numbers is manageable. Exponentiation producing very large results (millions of digits) may freeze the browser.
No. BigInt division always truncates to an integer quotient (like floor division toward zero). For example, 7n / 2n = 3n (not 3.5). The remainder is 7n % 2n = 1n. Our calculator shows both quotient and remainder.
Cryptocurrencies like Bitcoin use 256-bit integers for hashing and key generation β numbers with up to 78 decimal digits. Elliptic curve cryptography operations involve modular arithmetic on very large numbers. All blockchain transactions are secured by big number arithmetic.
Results use exact BigInt arithmetic. Very large computations (millions of digits) may slow or crash your browser. For educational use only.