Big O Notation
Definition
Mathematical notation for describing an asymptotic upper boundary for the growth of effort or functions with increasing input size.
In computer science, Big O is often used to describe how the time or memory requirement of an algorithm grows with the problem size. Formally, f(n)=O(g(n)) means that f is bounded above by a constant multiple of g from a sufficiently large input. Colloquially, Big O is often used inaccurately as an exact runtime class.
Simply explained
Big O does not describe the seconds on a particular computer, but how much the effort grows when the input becomes larger.
Why it matters in practice
Basis for algorithmic scalability and technical architectural decisions. Particularly useful when comparing search, sorting and data structure algorithms.
Example from business
Example scenario: Binary search requires logarithmically growing search steps in a sorted list and is typically described by O(log n).
Limits and pitfalls
- Understanding Big O as exact runtime; completely ignoring constants and real hardware; equating O and Θ; not distinguishing average and worst cases.
Origin & history
The NIST dictionary defines O-notation as an asymptotic upper barrier. A narrow asymptotic barrier is denoted by Θ; O alone does not determine an exact growth rate.
Use in mid-sized companies
- Use software with large amounts of data to identify early on which algorithms or data accesses could scale poorly; then supplement real measurements.
Frequently asked questions
Does Big O measure real seconds?
No.
Is an algorithm described as O(n²) always slower than one with O(n)?
No; O only gives upper bounds. For a reliable comparison, suitably tight bounds and concrete conditions are needed.
Is O the same as Θ?
No.
Sources
- big-O notation · NIST Dictionary of Algorithms and Data Structures, big-O notation
Source check: 09.10.2026. Definition and documented classification verified; examples describe possible applications.
Editorially reviewed on: