Calculator Website
Home
Programming
About
Contact
Time Complexity Estimator
Estimate runtime using a rough model: (operations ≈ k × f(n)) and time = operations / opsPerSecond.
Mode
Estimate runtime from n
Estimate max n for a time budget
Complexity f(n)
O(1)
O(log n)
O(n)
O(n log n)
O(n²)
O(n³)
O(2ⁿ)
O(n!)
Input size (n)
Time budget
milliseconds
seconds
minutes
hours
Ops per second (machine)
Common rough guesses: 1e8 to 1e9 ops/sec.
Constant factor (k)
If each iteration does more work, increase k (e.g., 5, 10, 50).
Calculate
Reset
Results
—
Estimated operations:
—
Ops/sec:
—
k × f(n):
—
Notes
This is a back-of-the-envelope estimator. Real runtimes depend on CPU cache, memory, branching, IO, and language/runtime. For O(2ⁿ) and O(n!), the model becomes unusable quickly; results may be capped.
← Back to Programming
Home