広告が嫌いですか? 行く 広告なし 今日

Big Integer Calculator

開発者数学
[iotools_big_integer_calculator]

ガイド

Big Integer Calculator

Big Integer Calculator

Compute exact results for math expressions that overflow ordinary calculators. The tool runs entirely on JavaScript BigInt, so factorial(1000), 25000, fibonacci(10000), and primality checks on trillion-digit candidates return every digit correctly — no scientific notation, no silent rounding.

使用方法

  1. Type an integer expression, for example 2 ** 1000, factorial(100)、 または gcd(1071, 462).
  2. Pick an output base (decimal, hex, binary, octal). The result updates as you type.
  3. Use Copy or Download to grab the full result — useful when the number runs to thousands of digits.
  4. Read the digit count under the result to compare growth rates of different expressions.

機能

  • Operators+, -, *, / (integer truncation), % (mod), ** または ^ (power), and postfix ! for factorial.
  • Built-in functionsfactorial, fibonacci / fib (fast-doubling), gcd, lcm, isprime (deterministic Miller-Rabin), nextprime, abs, pow, mod, and integer sqrt.
  • Number literals – decimal, 0x hex, 0b binary, 0o octal, plus _ separators for readability such as 1_000_000.
  • Output bases – render the same value in base 10, 16, 2, or 8 without recomputing.
  • Digit counter – instantly reports how many decimal digits the answer has, even when the result spans pages.
  • Runs in your browser – nothing is sent to a server, and the parser rejects negative exponents, decimal points, and unbounded exponents that would freeze the page.

Example Inputs

  • 100! – 158-digit factorial.
  • 2 ** 1000 – the value behind 1000-bit RSA-style key sizes.
  • fibonacci(500) – the 500th Fibonacci number, 105 decimal digits.
  • nextprime(10 ** 30) – the next prime above an octillion.
  • gcd(1071, 462) – the Euclidean algorithm at work.
  • isprime(1000000000039) – a 13-digit prime confirmed in milliseconds.

よくある質問

  1. Why do regular calculators give wrong results for large factorials or powers?

    JavaScript and most calculators use 64-bit floating-point numbers, which can represent integers exactly only up to 253-1 (about 9 quadrillion). Beyond that, results are silently rounded to the nearest representable float, so factorial(21), 254, and other large integers lose precision. BigInt-based calculators store digits arbitrarily, so every digit is exact.

  2. What is arbitrary-precision arithmetic and where is it used?

    Arbitrary-precision arithmetic represents integers with as many digits as memory allows, instead of a fixed register width. It is essential to RSA and elliptic-curve cryptography (keys are 2048-4096-bit integers), to financial systems that need exact decimals, to combinatorics, and to number-theory research.

  3. How does the Miller-Rabin primality test decide if a number is prime?

    Miller-Rabin picks witnesses a and checks whether a relationship that must hold for primes (derived from Fermat's little theorem) holds for the candidate n. A single random witness can be fooled, but with carefully chosen small witnesses the test becomes deterministic up to large bounds. With witnesses {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37}, the result is provably correct for every integer up to 3.317 * 1024.

  4. How big does factorial(n) get?

    Stirling's approximation gives log10(n!) ≈ n·log10(n/e) + 0.5·log10(2π·n). So 100! has about 158 digits, 1000! has 2568 digits, and 10000! has 35660 digits. A standard double-precision float overflows around 170!.

  5. Why are gcd and lcm so important in number theory?

    The greatest common divisor (gcd) and least common multiple (lcm) are the foundation for reducing fractions, solving linear Diophantine equations, the Chinese Remainder Theorem, and computing modular inverses. The Euclidean algorithm, used here, computes gcd in O(log min(a,b)) steps even for thousand-digit inputs.

広告なしで楽しみたいですか? 今すぐ広告なしで

拡張機能をインストールする

お気に入りのブラウザにIOツールを追加して、すぐにアクセスし、検索を高速化します。

に追加 Chrome拡張機能 に追加 エッジ拡張 に追加 Firefox 拡張機能 に追加 Opera 拡張機能

スコアボードが到着しました!

スコアボード ゲームを追跡する楽しい方法です。すべてのデータはブラウザに保存されます。さらに多くの機能がまもなく登場します!

ニュースコーナー 技術ハイライト付き

参加する

価値ある無料ツールの提供を継続するためにご協力ください

コーヒーを買って