%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

Big-O Growth Calculator (operations for n)

Results update as you type.

Your numbers

Understanding the Big-O growth calculator — concept and principle

Big-O notation describes how the work of an algorithm grows as the input size n grows. This calculator turns six common growth classes into concrete operation counts for your n and converts them into wall-clock time at a chosen speed, so you can see at a glance which algorithms stay practical and which explode.

How long six growth classes take for a million itemsAt 10⁹ operations a second: log n 0.02 µs, n 1 ms, n log n 19.9 ms, n² 1,000 s, n³ 31.7 years, 2ⁿ astronomical.n = 1,000,000 at 10⁹ steps a secondO(log n)20 steps0.02 µsO(n)10⁶ steps1 msO(n log n)2 × 10⁷ steps19.9 msO(n²)10¹² steps1,000 s ≈ 17 minO(n³)10¹⁸ steps31.7 yearsO(2ⁿ)> 10³⁰⁰ stepsastronomicalDouble n: log n +1 step · n² ×4 · n³ ×8
The same million items take a millisecond for O(n) but 31.7 years for O(n³).

How it is calculated

Constant factors and lower-order terms are ignored, exactly as in Big-O itself.

The principle

Big-O keeps only the fastest-growing term because, for large n, it dominates everything else. Doubling n adds one step to a log n algorithm, doubles an O(n) one, multiplies O(n²) by four and O(n³) by eight, and squares the work of O(2ⁿ). The speed figure of 10⁹ simple operations per second is a rough order of magnitude for one modern CPU core; real code may do far fewer useful operations per second because of memory access, branching and language overhead.

Worked example

  1. Inputs: n = 1,000,000, speed = 10⁹ operations per second.
  2. O(log n): log₂ 10⁶ ≈ 19.93 operations → 19.93 ÷ 10⁹ s ≈ 0.0199 µs.
  3. O(n): 10⁶ operations → 1 ms.
  4. O(n log n): 10⁶ × 19.93 ≈ 19,930,000 operations → 19.9 ms.
  5. O(n²): 10¹² operations → 1,000 s (about 17 minutes).
  6. O(n³): 10¹⁸ operations → 10⁹ s ÷ (86,400 × 365.25) ≈ 31.7 years.
  7. O(2ⁿ): n is far above 1,000, so the result is astronomical.

How to read the result

For interactive work aim for well under a second. With n = 10⁶, any O(n) or O(n log n) method is comfortable, O(n²) is already too slow for a request and O(n³) is hopeless. A useful rule of thumb at 10⁸–10⁹ simple steps per second: O(n²) is fine up to roughly n = 10⁴, O(n³) up to a few hundred, and O(2ⁿ) only to about n = 30.

Common mistakes

Keep in mind: These are order-of-magnitude estimates. Caches, memory bandwidth, I/O and parallelism can change real run times by factors of 10 or more, so benchmark before making decisions about production code.

Frequently asked questions

Which logarithm base does Big-O use?

It does not matter: log₂ n and log₁₀ n differ only by a constant factor, which Big-O ignores. The calculator uses base 2 because halving is the usual cause.

Is O(n log n) much slower than O(n)?

Only by a factor of log₂ n, about 20 for a million items and 30 for a billion, which is why sorting is rarely the bottleneck.

What is the difference between O, Θ and Ω?

O is an upper bound, Ω a lower bound and Θ a tight bound that holds in both directions.

Sources: D. E. Knuth, "Big Omicron and Big Omega and Big Theta", SIGACT News 8(2), 1976 · T. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein, Introduction to Algorithms, MIT Press (growth of functions)

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →