Big-O Time Complexity Calculator

Operations vs. n for common Big-O classes: O(1), O(log n), O(n), O(n log n), O(n²), O(2ⁿ).

Inputs

Modern CPU: ~1e9 simple ops/sec.

Result

Estimated operations
9,966
≈ 9.97 μs at 1,000,000,000 ops/sec.
  • n1000
  • ComplexityO(n log₂ n)
  • Operations9,966
  • Ops/sec1,000,000,000
  • Time9.97 μs

Step-by-step

  1. Substitute n = 1000 into n log₂ n.
  2. Operations ≈ 9,966.
  3. Time = ops / cps = 9.97 μs.

How to use this calculator

  • Enter input size n.
  • Pick complexity class.
  • Read estimated operations + wall-clock time.

About this calculator

Big-O notation describes algorithm growth rate as input size increases. O(1) — constant (hash lookup). O(log n) — binary search. O(n) — linear scan. O(n log n) — quicksort/mergesort, optimal comparison sort. O(n²) — bubble/selection sort, naive nested loop. O(2ⁿ) — naive recursive Fibonacci, brute-force subset. O(n!) — TSP brute force, factors quickly become impossible. Modern CPUs do ~10⁹ simple ops/sec; an O(n²) algorithm hits a wall at n ≈ 100,000.

Frequently asked

For binary algorithms (search, divide-and-conquer). Other bases differ by constant factor — Big-O ignores constants.

Related calculators