Big-O Complexity Visualizer
Explore how 1, log₂ n, n, n log₂ n, n² and 2ⁿ grow. Select curves and an integer input size to compare formula values; no algorithm or elapsed time is measured.
Compare theoretical growth only; this is not a runtime benchmark.
Horizontal: input size from 1 to n on a linear scale. Vertical: log(1 + formula value), normalized to the largest selected value. Logs in the formulas use base 2; values are rounded to five significant digits.
A QUICK WALKTHROUGH
How to use this tool
- Enter an integer input size n from 1 to 1000.
- Select one or more curves, or use Select all; changes update the comparison automatically.
- Read the chart and table. Update comparison refreshes the result; Clear removes all selections and results.
Chart and formulas
The chart samples 80 rounded, geometrically spaced input sizes from 1 to n. Horizontal positions use the actual input size on a linear axis; the vertical axis applies log(1 + value), normalized to the largest selected value. There is no scale switch, cubic or factorial curve.
Approximate local results
Values use JavaScript floating-point numbers and display five significant digits in the page language. The n ≤ 1000 limit keeps 2ⁿ finite. log₂(1) and 1·log₂(1) are zero. Constants and lower-order terms are omitted; these illustrative formula values are not measured operation counts or runtime predictions. Nothing is uploaded.
GOOD TO KNOW
Common questions
Does this measure algorithm speed?
No. It evaluates six mathematical formulas without running an algorithm, timing code or predicting a device’s performance.
Why can the chart change when I select a curve?
The vertical log(1 + value) scale is normalized to the largest selected value. Use the table for numeric comparisons; clearing every curve removes the result.