CodeCookbook

Complexity Calculator

Estimated operation counts for common Big-O classes. Click a row or use the selector below to explore.

ComplexityClassn=10n=100n=1.0Kn=10.0Kn=100.0Kn=1.0M
O(1)Constant111111
O(log n)Logarithmic3710131720
O(n)Linear101001.0K10.0K100.0K1.0M
O(n log n)Linearithmic3366410.0K132.9K1.7M19.9M
O(n²)Quadratic10010.0K1.0M100.0M10.0B1.0T
O(n³)Cubic1.0K1.0M1.0B1.0T1.00e+151.00e+18
O(2ⁿ)Exponential1.0K
<1M ops (fast)1M–1B ops (slow)>1B ops (very slow)overflow / ∞

Custom Estimate

Estimated operations

~10.0K

9.97e+3 ops

Estimated time @ 10⁹ ops/sec

~10.0 µs

Algorithms with time complexity O(n log n)

Estimates assume 1 ns per operation (10⁹ ops/sec). Real performance varies by constant factors, cache behavior, and hardware.