Big Number Calculator
Add, subtract, multiply, or divide arbitrarily large whole numbers exactly, with no precision loss beyond JavaScript's normal number limits.
How It's Calculated
Formula
\text{result} = \text{value}_A \;\text{op}\; \text{value}_B \quad (\text{exact integer arithmetic})Standard JavaScript numbers lose precision beyond Number.MAX_SAFE_INTEGER (2^53 - 1, about 9 quadrillion) — arithmetic past that point can silently round to the wrong answer. This calculator instead uses BigInt, a built-in JavaScript type for exact, arbitrary-precision whole numbers, so results stay exactly correct no matter how many digits are involved. Enter two whole numbers (each optionally starting with a minus sign for negative values, with no decimal point) and choose an operation. Addition, subtraction, and multiplication are exact with no upper limit. Division uses integer (truncating) division — the quotient is rounded toward zero, and the exact remainder is reported separately, since a fractional big-number result isn't representable as an exact integer.
Worked Examples
Adding past Number.MAX_SAFE_INTEGER: 99999999999999999999 + 1
- Regular JavaScript Number arithmetic would round this incorrectly
- BigInt arithmetic: 99999999999999999999 + 1 = 100000000000000000000 (exact)
Integer division with remainder: 100 ÷ 3
- Quotient: 100 / 3 = 33 (truncated toward zero)
- Remainder: 100 - (33 x 3) = 1
Frequently Asked Questions
Why not just use regular numbers?
JavaScript numbers are IEEE 754 double-precision floats, which can only represent whole numbers exactly up to Number.MAX_SAFE_INTEGER (2^53 - 1). Beyond that, arithmetic can silently produce a slightly wrong result. BigInt has no such ceiling, so arbitrarily large whole numbers stay exact.
Why does division report a remainder instead of a decimal?
BigInt only represents exact whole numbers, not fractions or decimals. Dividing two BigInts truncates toward zero and discards any fractional part, so the remainder is reported separately to show exactly what was left over, rather than losing that information or approximating it as a float.
Is there a limit to how many digits I can enter?
No practical limit — BigInt arithmetic scales to however many digits you provide, limited only by your browser's available memory, not by a fixed bit width.
Can I enter decimal numbers?
No. This calculator is for exact whole-number (integer) arithmetic only — decimal points and scientific notation are rejected, since BigInt itself has no concept of a fractional value.