Big-O Runtime Estimator
See how long algorithms of different Big-O complexity take for an input size, from O(1) to O(n!).
Your inputs
See the method ↓Enter quantities in the labelled units. Unit changes keep the entered number; calculate again.
Loading calculator… If this message remains, reload the page.
HOW THE CALCULATION WORKS
Transparent big-o runtime estimator method
- Time = operations ÷ operations per second.
- Operations: 1, log₂ n, n, n log₂ n, n², n³, 2ⁿ, n!.
- n! uses log₁₀ sums; very large values are reported as longer than the universe’s age.
Worked example
n = 1,000,000 at 10⁹ ops/s: O(n) 1 ms, O(n log n) 19.9 ms, O(n²) 1,000 s (about 17 minutes).
Defaults and assumptions
- n starts blank; the speed defaults to one billion operations per second.
- Changing a unit keeps and reinterprets the entered number; recalculate. Reset restores the displayed configuration defaults, including any explicitly named customer defaults. The example is demonstration data.
- Numeric inputs accept decimals, fractions, mixed numbers, grouped commas and scientific notation within 80 characters. Each field shows its supported range. Some tools accept negative values; required divisors must be nonzero or positive as stated. These bounds are not safe-use recommendations.
Limitations
- Big-O ignores constants and hardware effects; real code can differ by orders of magnitude.
Precision and rounding
Supported arithmetic uses exact fractions. Formulas involving logarithms, trigonometry, statistical functions or simulations can use numerical approximations; storing an approximation as a fraction does not make it exact. Decimal display rounds to at most 6 fractional places, so very small values can appear as approximately zero. Time displays round to the nearest second where shown. Whole-item rounding follows the stated formula.
Sources
Use the assumptions, worked example and sources to interpret your result. Estimates do not replace professional advice.
How to use this calculator
- Enter the measured quantities in the labelled units; inspect any named customer defaults.
- Check the units, dates and selected options. Where a tool asks for a rate, price or product specification, use a value appropriate to your situation.
- Calculate and compare the result, exact details, assumptions and worked example.
Common questions
Are the example values recommendations?
No. They demonstrate the arithmetic. Use measurements, product labels and supplier information appropriate to your situation.
What happens when I change units?
The entered number stays the same and is reinterpreted in the new unit. The old result is cleared; calculate again.
Are inputs sent to a server?
No. Calculations stay in your browser. A calculation record is downloaded only when you request it.
Report a problem or suggest a calculator
Found a confusing result, a missing option, or an idea for a new calculator? Send it privately to the site owner.
Opening the form loads Cloudflare Turnstile, a spam check that processes connection and device information. Privacy details.
Related tools
Scientific Notation Converter
Convert numbers to scientific and E notation exactly.
Open calculator →Hash Collision Probability Calculator
Estimate the probability of a hash collision (the birthday problem) for a hash size and number of items.
Open calculator →Password Entropy Calculator
Estimate a randomly generated password’s entropy in bits and how long a brute-force attack would take.
Open calculator →