Big-O Growth Comparison Calculator

Big-O notation captures how an algorithm's work scales with input size n, setting aside constant factors. The difference between complexity classes is stark at scale: a linear algorithm and a quadratic one are close for tiny inputs but worlds apart for large ones. Enter an input size n and this calculator evaluates the common growth functions at that point: constant, logarithmic, linear, linearithmic (n log n), quadratic, cubic, and exponential. It shows why choosing the right complexity class matters far more than micro-optimizing constants.

0.00
0.00
0.00
0.00
0.00
0.00

Growth function definitions

O(1) = 1 (constant, independent of n)
O(log n) = log base 2 of n
O(n) = n
O(n log n) = n * log base 2 of n
O(n^2) = n * n; O(n^3) = n * n * n
O(2^n) = 2 raised to the power n

Each row is the operation count for that complexity class at the input size you entered. Constant O(1) is always 1.

Complexity context

  • O(log n): binary search and balanced-tree lookups; grows extremely slowly.
  • O(n): a single pass over the input, such as a linear scan.
  • O(n log n): efficient comparison sorts like merge sort and heap sort.
  • O(n squared): nested loops, such as a naive pairwise comparison.
  • O(2 to the n): brute-force subset enumeration; becomes infeasible quickly.

Big-O growth calculator: frequently asked questions

What does Big-O notation describe?

Big-O describes how the number of operations an algorithm performs grows as the input size n increases, ignoring constant factors. O(n) means work grows linearly with n, O(n squared) means it grows with the square of n, and O(log n) means it grows very slowly. It is a measure of scalability, not of exact runtime.

How do common complexities compare at large n?

At n equal to 1,000: O(log n) is about 10, O(n) is 1,000, O(n log n) is about 9,966, O(n squared) is 1,000,000, and O(2 to the n) is astronomically large. The gap widens dramatically as n grows, which is why complexity class matters more than constant factors at scale.

Why does this calculator cap the exponential value?

O(2 to the n) grows so fast that beyond about n equal to 50 the result exceeds what can be displayed meaningfully. The calculator reports it where it is finite and marks it as effectively unbounded for larger n, which is itself the key lesson about exponential algorithms.

Is Big-O the same as actual running time?

No. Big-O is an asymptotic upper bound on growth, ignoring constants and lower-order terms. An O(n) algorithm with a large constant can be slower than an O(n log n) one for small n. This tool shows the growth functions so you can compare scaling behavior, not wall-clock time.

What is the natural log used for here?

Logarithmic complexity is often written O(log n) without specifying a base, because changing the base only multiplies by a constant. This calculator uses base 2 for log n and n log n, the convention for binary-splitting algorithms like binary search and many sorts.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.