Home

Big Integer Calculator

Add, subtract, multiply and divide large integers exactly. Compare remainder and modulo rules, or find GCD and LCM without floating-point rounding.

Enter your numbers

Live calculation
Try an example:

Choose one operation. Division returns an integer quotient and remainder.

Up to 1,000 integer digits. A leading sign, matching 0b/0o/0x prefix and single underscores between digits are accepted. No expressions or decimal fractions.

Up to 1,000 integer digits. A leading sign, matching 0b/0o/0x prefix and single underscores between digits are accepted. No expressions or decimal fractions.

Also included in this result: Input base: 10.

Additional settings (1)

Whole-number radix from 2 to 36. Common bases: binary 2, octal 8, decimal 10, hexadecimal 16.

Results update as you type. Example values are editable.

Sum

9007199254740995

Exact integer result, displayed in decimal.

Inputs and result use exact integer arithmetic. Input base is shown in Additional settings; the main answer is decimal.

Inputs stay on this page. Reloading clears unsaved changes.

More results, charts and tables
Binary0b100000000000000000000000000000000000000000000000000011
Octal0o400000000000000003
Hexadecimal0x20000000000003
How it is calculated
Operands are parsed directly as BigInt values; they are never converted through JavaScript Number. Division returns an integer quotient and remainder, not a rounded decimal. For example, −7 ÷ 3 gives quotient −2 and remainder −1, because −7 = (−2 × 3) − 1. GCD and LCM are nonnegative; this tool defines GCD(0, 0) = 0 and LCM(0, B) = 0. Python modulo uses floor division and follows the divisor’s sign; Euclidean modulo is nonnegative, including with negative divisors. All division and modulo modes reject a zero divisor. Supports bases 2–36 and at most 1,000 input digits per operand. Only the selected operation is calculated; no expression or JavaScript code is evaluated.

Big Integer Calculator

CalcsDecoded.com

Sum

9007199254740995

Exact integer result, displayed in decimal.

Inputs and result use exact integer arithmetic. Input base is shown in Additional settings; the main answer is decimal.
Result breakdown
MeasureResult
Binary0b100000000000000000000000000000000000000000000000000011
Octal0o400000000000000003
Hexadecimal0x20000000000003

Inputs used

  • Operation: Add: A + B
  • Integer A: 9007199254740993
  • Integer B: 2
  • Input base: 10

Method and assumptions

Operands are parsed directly as BigInt values; they are never converted through JavaScript Number. Division returns an integer quotient and remainder, not a rounded decimal. For example, −7 ÷ 3 gives quotient −2 and remainder −1, because −7 = (−2 × 3) − 1. GCD and LCM are nonnegative; this tool defines GCD(0, 0) = 0 and LCM(0, B) = 0. Python modulo uses floor division and follows the divisor’s sign; Euclidean modulo is nonnegative, including with negative divisors. All division and modulo modes reject a zero divisor. Supports bases 2–36 and at most 1,000 input digits per operand. Only the selected operation is calculated; no expression or JavaScript code is evaluated.

Examples and assumptions

Calculate with large whole numbers without passing them through floating-point Number values.

Add above the safe-integer limit

9007199254740995.

The operands are read as exact integers and two is added without rounding.

Negative integer division

Quotient -2; remainder -1.

Division truncates toward zero: -7 = (-2 × 3) + (-1).

Greatest common divisor

6.

48 = 2 × 18 + 12; 18 = 1 × 12 + 6; 12 = 2 × 6. The last nonzero remainder is 6.

Python modulo with a negative dividend

Modulo 2; quotient -3.

-7 = 3 × (-3) + 2. Floor division rounds the quotient downward.

Nonnegative modulo with a negative divisor

Modulo 2; quotient 3.

-7 = (-3) × 3 + 2. Euclidean remainder stays nonnegative.

Before you use the result

  • Supports integers, not decimal or fractional arithmetic. Each operand is limited to 1,000 digits.
  • The main answer is decimal. Input base is selected in Additional settings; binary, octal and hexadecimal results are also available.
  • Integer divide and Remainder truncate toward zero. Python modulo follows the divisor’s sign; Euclidean modulo is nonnegative. GCD(0,0) and LCM with a zero operand are defined as 0 here.
Calculation checks and references

Independent signed integer references cover all nine operations and the three signed quotient/remainder identities, large products, quotient/remainder conservation, zero divisors and nonnegative GCD/LCM.

Reference cases checked: . Checks are automated reference calculations; an independent professional review is not claimed.

References explain definitions, rules or context; they do not endorse CalcsDecoded.com. See our calculation methodology for the testing and updating standard.

Frequently asked questions

Does division return a decimal?

No. It returns the integer quotient truncated toward zero and a remainder. For -7 divided by 3, the quotient is -2 and remainder is -1.

Can I enter an expression or JavaScript?

No. Enter one integer in each operand field and select an operation. No code or expression is executed.

Which bases are supported?

Input bases 2–36 are available in Additional settings. The primary answer is decimal, with other formats in the result details.