Estimate Big-O operations and runtime for any N. Interactive reference table for all complexity classes from O(1) to O(N!).
“10 to the 8th operations per second” is the rule of thumb every competitive programmer learns and the reason so many of them get a surprise verdict. A hash map lookup and an array read are both one operation in Big-O and differ by roughly 3 times in wall clock; the same loop in CPython rather than C++ differs by around 40. The Time and Space Complexity Calculator multiplies those factors in rather than pretending one number covers everything.
Pick an input size, a language, a data structure and a time limit, and each of 9 complexity classes reports an estimated running time and a verdict band. SAFE means under 40% of the limit, RISKY means up to 90%, and TLE means over. Bands rather than a tick and a cross, because the interesting answer is usually the middle one.
Everything is arithmetic in the page. Nothing is compiled, nothing is benchmarked, and no code is uploaded. The estimate is a model, and the model is stated on screen so you can argue with it.
∞ (too large) rather than a meaningless figure, and the exponential and factorial classes cap their exponents at 60 and 20 so the arithmetic stays finite.Runtime profile — the same Big-O class can differ 10-40× depending on these three settings
C++ (-O2): Reference baseline — tight loops, no bounds checks. · Array, sequential: Prefetcher-friendly — ~1 cycle/element amortized.
| Complexity | Ops (N=1,000) | Verdict |
|---|---|---|
| O(1) | ~1 | SAFE |
| O(log N) | ~10 | SAFE |
| O(N) | ~1.0K | SAFE |
| O(N log N) | ~10.0K | SAFE |
| O(N√N) | ~31.6K | SAFE |
| O(N²) | ~1.0M | SAFE |
| O(N³) | ~1.0B | TLE |
| O(2^N) | ~1152.9P | TLE |
| O(N!) | ~2432.9P | TLE |
Model: effective time = (N-dependent operation count) × structure multiplier × language multiplier, measured against a 1e+9 op/sec C++ baseline. SAFE = under 40% of the time limit, RISKY = 40–90% (passes on your machine, dies on a colder judge core or a hack test), TLE = over 90%. Pick the profile that actually matches your solution — a segment tree is not a flat array, and CPython is not C++.