AI & Computing

Algorithm Running Time Calculator (Big O)

Pick a complexity and input size to see how long the algorithm would run.

Your numbers

Your results

Estimated time
Estimated time
—
Operations
—
Time if n grows 10×
—

Algorithm Running Time Calculator (Big O) by TheCalcTools

How the Algorithm Running Time Calculator (Big O) works

Big O describes how the number of operations grows with input size, ignoring constant factors. This calculator assumes exactly that many simple operations at the speed you enter.

Real programs have constants, caches and memory effects, so treat results as orders of magnitude. The point is the growth: O(n²) at a million items is a trillion operations.

The formula

Time ≈ f(n) ÷ operations per second

Worked example

Using the default values shown in the calculator:

Time complexityO(n log n)
Input size n1e+06
Operations per second1e+09
  1. O(n log n) for a million items: about 19930000 operations, or 0.0199 seconds.

Result:

Estimated time0.0199 seconds
Operations19930000
Time if n grows 10×0.233 seconds

Frequently asked questions

Why does O(2ⁿ) explode?

Each extra item doubles the work: n = 60 is already about 10¹⁸ operations.

Sources and further reading

More in AI & Computing · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.