Numbers & representations

Exact Integer Calculator

Add, subtract, multiply and divide large integers. Find GCD, LCM and running totals with exact results.

Stays in your browserFiles and text are processed in this tab.
Exact Integer CalculatorLocal processing
Enter at least one value.

Numbers & representations

How it works

Integers include zero, positive whole numbers and negative whole numbers. Exact arithmetic is useful for counters, identifiers and values too large for ordinary floating-point calculators.

What you can do

Use new lines, spaces or commas between operands. Subtraction follows input order. Division takes exactly two operands; its main result is the quotient and the remainder appears separately. Running modes return one result per operand.

How to use it

  1. Choose the calculation and the input/output bases. For division, supply exactly two integers in dividend-then-divisor order.
  2. Paste one value per line or open a UTF-8 text file.
  3. Select Convert, inspect the result, then copy or download TXT. Changes clear old results. Undo restores your previous input and settings.

Errors and limits

Division truncates toward zero; the remainder has the dividend’s sign. For −7 ÷ 3, quotient −2 and remainder −1 satisfy −7 = (−2 × 3) + (−1). Input and output bases are independent. No expression syntax, decimals or powers.

Limits: 200,000 input characters, 500 values and 1,000,000 output characters. The entire batch stops on an invalid line.

Each numeric input accepts at most 1,000 digits. Intermediate integer arithmetic is bounded to 16,384 bits.

Frequently asked questions

What is the difference between GCD and LCM?

GCD is the largest positive integer dividing every operand. LCM is the smallest positive shared multiple; if any operand is zero, its LCM here is zero. GCD(0,0) is defined as zero.

Are my values uploaded?

No. Processing and file reading happen in this browser tab. Values are not placed into URLs or sent to a conversion service. Downloaded files remain under your control.

Related tools