Big Number Calculator
Add, subtract, multiply, divide, raise to powers and find the GCD/LCM of huge whole numbers with every digit exact — up to 5,000 digits per input, no rounding or scientific-notation loss.
How it works
Exact integer (arbitrary-precision) arithmetic: A + B, A − B, A × B, A ÷ B = quotient + remainder/B, A mod B (sign of B), A^B by repeated squaring, GCD by Euclid’s algorithm, LCM = |A × B| ÷ GCD
Ordinary calculators and spreadsheets store numbers as 64-bit floating point, so they keep only about 15–17 significant digits — 123456789012345678901234567890 × 987654321 comes back rounded. This tool works with arbitrary-precision integers (JavaScript BigInt), so every digit of the answer is exact. Division returns the whole-number quotient, the remainder and the first 30 decimal places; GCD uses Euclid’s algorithm and powers use exponentiation by squaring.
Worked example
123,456,789,012,345,678,901,234,567,890 × 987,654,321 = 121,932,631,124,828,532,112,482,853,211,126,352,690 — a 39-digit result, about 1.219326311 × 10^38. A floating-point calculator would show only 1.2193263112482853E+38.
Sources: MDN Web Docs — BigInt (arbitrary-precision integers) · Euclidean algorithm (Wikipedia)
Frequently asked questions
How big can the numbers be?
Each input can have up to 5,000 digits, and results up to about 20,000 digits are shown in full. Powers that would exceed 20,000 digits are refused so the page stays responsive.
Why does my normal calculator give a different answer?
Standard calculators keep about 15–17 significant digits and round the rest, so large products and powers lose their last digits. Big-number (arbitrary-precision) arithmetic keeps every digit exactly.
Can I use decimals?
Inputs must be whole numbers. For a decimal, scale it first: 1.5 × 2.25 = (15 × 225) ÷ 1,000. Division results do show 30 exact decimal places.
How is the remainder signed for negative numbers?
For A ÷ B the quotient is truncated toward zero and the remainder has the sign of A. The A mod B option instead gives a result with the sign of B (so −7 mod 3 = 2), the convention used in most math courses.
How do I calculate 2^1000 or 100!?
Pick Power with A = 2 and B = 1000 to get all 302 digits of 2^1000. For factorials, use the factorial calculator; 100! has 158 digits.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.