Arbitrary-precision integer arithmetic and conversions (BigInt).
The Big Number Calculator does exact integer arithmetic on numbers far larger than a normal JavaScript number can hold. It supports add, subtract, multiply, divide, modulo, power and gcd, and shows the result in decimal, hexadecimal and binary. Use it for checking cryptography values, factorials, IDs and any calculation where rounding is not acceptable.
Ordinary JavaScript numbers are 64-bit floating-point values, which represent integers exactly only up to 2^53 - 1, about 9 quadrillion. Beyond that, digits are lost to rounding. Big integers, called BigInt in JavaScript, store as many digits as memory allows and keep every digit exact. This tool parses your input as BigInt and applies integer operations. Division is integer division that truncates toward zero, so 7 / 2 is 3 and -7 / 2 is -3. The modulo result takes the sign of the first number, so -7 mod 2 is -1. The gcd is the greatest common divisor, the largest integer that divides both numbers evenly. Results can be read in base 10, base 16 or base 2.
Standard floating-point numbers are exact only up to 2^53 - 1. A big-integer calculator keeps every digit, which matters for cryptographic keys, hashes, factorials and large IDs.
No. Only integers are accepted and division returns the truncated integer quotient. Use mod to get the remainder.
As a minus sign followed by the magnitude, for example -0xff. It is not a two's complement bit pattern.
The greatest common divisor of A and B, ignoring signs. It uses the Euclidean algorithm.
Huge inputs or powers can take a long time to compute and render. The caps are 5000 characters per number, exponents up to 20000, and powers whose result would be extremely large are refused with Result would be too large.
No. The arithmetic runs in the page and the values are not sent to a server.