Skip to content
UniKit

Big number calculator

Arbitrary-precision arithmetic with BigInt: expressions with parentheses and + - * / % ^ !, integer division with remainder, powers, factorials, GCD/LCM, modulo, comparison, and decimal/hex/binary output.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Expression
Result
Hexadecimal
Binary

Two operands · GCD / LCM / modulo / comparison

Both operands accept decimal, 0x hex, 0b binary and thousands separators

Operation
Result
21

What this tool does

  • Work out cryptography-sized numbers — `2^256`, `2^64 + 1`, the modular intermediate values in an RSA example — that overflow an ordinary calculator.
  • Compute factorials and combinatorial values: `100!` has 158 digits, and the tool also reports the digit count, bit length and byte size.
  • Find a greatest common divisor, least common multiple, modulo or comparison, with both operands accepting 0x hex and 0b binary literals.
  • Check a bit-manipulation or hashing implementation by switching the result to hex or binary instead of counting bits by hand.

Example

Input

2^100 + 3^40

Output

1,267,650,600,240,387,066,955,760,134,177

This is the real result for the built-in example; decimal output is grouped with thousands separators. The same value in hex is 0x1000000000A8B8B452291FE821 and its bit length is 101.

Frequently asked questions

Can it handle decimals or return a fractional division?

No. Everything runs on BigInt with integer arithmetic: `1.5` is rejected as an unknown character, `7/2` returns 3 (truncating, i.e. integer division) and `%` is the remainder operator. That is deliberate — arbitrary-precision decimals need a different library and would blur the promise of an exact result.

Why is there an exponent limit?

Because results grow exponentially. The exponent is capped at 100000 and the result at one million bits (roughly 300k decimal digits); beyond that you get “Result too large”. The guard exists so `2^999999999` cannot lock up the browser tab — for numbers that size, Python ints or GMP are the right tool.

How large a factorial can it compute?

The argument is capped at 10000, which is about 35660 decimal digits and takes a moment in a modern browser. Passing a larger number or a negative one reports “Factorial argument too large” or “Factorial only accepts non-negative integers”.

What sign does the modulo result have?

It follows the dividend, matching JavaScript’s `%`: `-7 % 3` is -1, not 2. If you need the non-negative mathematical remainder, write `((-7 % 3) + 3) % 3`, or use a dedicated modular-arithmetic tool.

Are the calculations sent to a server?

No. Expression parsing and BigInt arithmetic happen entirely in your browser with no network requests, and it works offline.

Keywords:bigintbig number大数计算大数计算器任意精度arbitrary precision阶乘factorialgcdlcm最大公约数最小公倍数pow幂运算余数remainder

Related tools