Big O notation Created 2026-09-24 Updated 2026-10-14
The statement as means there are constants and such that
The same constant must work for all sufficiently large inputs. Near a finite limit point , replace by within the domain. Absolute values allow signed or complex-valued functions; when discussing nonnegative operation counts they can be omitted.
The notation records an upper bound, not an exact leading coefficient or necessarily a tight growth order. For example, because for it is at most . It is also , a weaker statement. A tight comparison uses big theta notation; a ratio tending to one uses asymptotic equivalence. Formally denotes a class of functions, and writing is conventional shorthand for membership in that class. [ref]
Figure 1.
Constants affect finite comparisons while normalized ratios expose eventual growth
. Details.
The first panel compares stipulated operation counts and . Although is linear and quadratic, for ; the ordering reverses beyond their crossing. These are mathematical cost models, not measured runtimes. The time complexity notation describes the growth of whichever cost function has been specified, whether that function represents a worst-case bound, an average, or another explicit quantity.
The middle panel gives a concrete eventual bound: for every . Its normalized ratio approaches one, but the threshold matters. The final panel shows the asymptotic comparison of exponential functions, with its geometrically shrinking relative difference.
Constants may depend on fixed parameters. For each fixed , is with ; one constant cannot cover every positive . A uniform big O bound makes this extra quantifier explicit.
The notation was already used in nineteenth-century number theory. In his 1976 paper, Donald E. Knuth reports Landau identifying Bachmann's 1894 book as the first appearance of known to him. Knuth's account gives the earlier mathematical setting of a notation now also common in time complexity analysis. [ref]