How to use this calculator
- 1 Type the first number (A) and the second number (B). Use digits only, with an optional + or − sign.
- 2 Choose an operation. For a power, B is the exponent and must be from 0 to 10,000.
- 3 Read the result and its digit count. Results are whole numbers, so decimals are not supported.
What counts as a big number?
Most calculators show about 10 to 16 digits. Anything larger is either rounded or shown in scientific notation. The factorial of 30, for example, has 33 digits, which is more than most calculators can show.
This calculator treats each whole number as a string of digits, so the length is limited only by the 10,000-digit input cap. For example, 2⁶⁴ is 18,446,744,073,709,551,616. That has 20 digits, and every one of them is shown.
You can also type very long numbers directly, such as 12345678901234567890 times 12, which gives 148148146814814814680.
Why exact answers matter
Many calculators store numbers with about 15 to 17 significant digits. When a number is longer, the last digits can be lost. For example, 9,007,199,254,740,993 cannot always be held exactly by that kind of calculator.
Exact integer arithmetic keeps every digit. That matters in number theory and computer science, and in checking long ID numbers. The answer is the same no matter how many digits you enter.
The trade-off is that decimals are left out. Exact results for decimals would need a fixed number of places, so this tool works only with whole numbers.
Quotient, remainder and modulo
Division of whole numbers gives two results. The quotient is how many whole groups of B fit into A. The remainder is what is left over. For example, 100 ÷ 7 gives a quotient of 14 and a remainder of 2, because 7 × 14 + 2 = 100.
The calculator also offers modulo. For positive numbers, modulo and remainder give the same answer. They differ only when a negative number is involved, and the sign rule is the difference.
For more on remainders with ordinary numbers, the long division calculator shows each step.
Powers and the greatest common divisor
A power multiplies a number by itself. The exponent can be from 0 to 10,000, and the result is limited to 100,000 digits. So 2¹⁰ is 1,024, while a very large exponent on a big base is refused with a message.
The greatest common divisor (GCD) is the largest whole number that divides both numbers. The calculator finds it with the Euclidean algorithm, which works well even for very long numbers. For example, the GCD of 48 and 180 is 12. The GCF calculator shows each step for smaller numbers.
Reading digit counts and scientific notation
Each result shows its number of digits, its sign and the first digits in scientific notation. The digit count is useful for checking. For example, 10¹⁰⁰ is a 1 followed by 100 zeros, so it has 101 digits.
A quick way to check a result is to count the digits. Multiplying a 10-digit number by a 12-digit number always gives 21 or 22 digits.
To write a result as a short power of ten, use the scientific notation calculator.
Very large numbers also matter for internet security. Some encryption methods depend on the difficulty of splitting a huge number into its prime factors. For smaller numbers, the prime factorization calculator shows each prime.
The formula
Quotient and remainder
A = B × q + r, where q is the whole-number quotient and r is the remainder
- q
- the quotient, rounded toward zero
- r
- the remainder, with the same sign as A
Modulo
mod(A, B) = A − B × ⌊A ÷ B⌋, so the result has the same sign as B
- ⌊ ⌋
- round down to the nearest whole number
Greatest common divisor
gcd(A, B) is found by the Euclidean algorithm: gcd(A, B) = gcd(B, A mod B) until B is 0
- gcd
- the largest whole number that divides both A and B
Worked example
10³⁰ divided by 7
- 1.A = 1 followed by 30 zeros, and B = 7
- 2.Quotient: 142857142857142857142857142857 (30 digits)
- 3.Remainder: 10³⁰ − 7 × 142857142857142857142857142857 = 1
The quotient is 142,857,142,857,142,857,142,857,142,857 with remainder 1.
Frequently asked questions
Why does this calculator not show decimals?
It uses exact integer arithmetic, which keeps every digit with no rounding. Decimal results would need a fixed number of places, so they are left out on purpose.
How big a number can I enter?
Each input can have up to 10,000 digits. A power can have an exponent up to 10,000, and its result is limited to 100,000 digits. A sum can have one more digit than its longest input.
What is the difference between remainder and modulo?
They differ only when a negative number is involved. The remainder keeps the sign of A, so −7 divided by 3 has remainder −1. Modulo keeps the sign of B, so −7 modulo 3 is 2.
Is the answer rounded in any way?
No. Every operation uses whole-number arithmetic, so the result has every digit the operation produces. The only limit is the digit caps described above.
Sources
Last reviewed by the GridCalculators team.