Grover versus classical search: the numbers
Query counts side by side from a thousand items to a trillion, why the speedup is only quadratic, and why that is provably the best possible.
7 min read · reviewed December 2026
Counting queries
A query is one call to the checker. A classical search that tries candidates without repeating needs, on average, (N + 1)/(M + 1) queries to find one of M correct answers among N, and N − M queries to be certain. Grover needs about (π/4)·√(N/M).
The table below is calculated on the page from these formulas. The quantum column assumes one correct answer and one oracle call per iteration, and it ignores the cost of building the oracle.
| Items (N) | Classical average | Classical, guaranteed | Grover iterations |
|---|---|---|---|
| 2^10 | 513 | 1,023 | 25 |
| 2^20 | 524,289 | 1,048,575 | 804 |
| 2^30 | 536,870,913 | 1.07 × 10^9 | 25,735 |
| 2^40 | 5.50 × 10^11 | 1.10 × 10^12 | 823,549 |
| 2^64 | 9.22 × 10^18 | 1.84 × 10^19 | 3.37 × 10^9 |
| 2^128 | 1.70 × 10^38 | 3.40 × 10^38 | 1.45 × 10^19 |
The gap grows with size
At a thousand items the saving is modest: a classical search needs about 500 checks on average and Grover needs about 25. At a trillion items classical search needs about 500 billion checks and Grover about 800 thousand. The ratio is roughly √N/1.6.
Why it is only quadratic
In 1997 Bennett, Bernstein, Brassard and Vazirani proved that any quantum algorithm for unstructured search needs on the order of √N queries. So Grover’s algorithm is optimal, not just a first attempt. This also shows that quantum computers cannot solve NP-complete problems by brute force in polynomial time using this method, which is a common misreading.
An exponential speedup, like the one in Shor’s algorithm, comes from exploiting structure in the problem. Search without structure has none to exploit.
Quadratic is still useful, in theory
Many hard problems can be phrased as a search over candidate solutions, including satisfiability, scheduling and key recovery. A square-root saving on exponential work is meaningful in principle: a problem needing 2¹²⁸ checks classically would need about 2⁶⁴ Grover iterations. Whether that is practical depends on the machine, as the next guide explains.
Try it
Questions
Is the quantum speedup exponential?
No. It is quadratic, and it is provably the best possible for unstructured search.
Could a smarter quantum algorithm beat √N?
Not for completely unstructured search. If the problem has structure, other algorithms may do better, and that is where most research effort goes.
Read next
Sources and further reading
- L. K. Grover, “A fast quantum mechanical algorithm for database search” (1996)
- C. Bennett, E. Bernstein, G. Brassard, U. Vazirani, “Strengths and weaknesses of quantum computing” (1997)
- M. Boyer, G. Brassard, P. Høyer, A. Tapp, “Tight bounds on quantum searching” (1996/1998)
- G. Brassard, P. Høyer, M. Mosca, A. Tapp, “Quantum amplitude amplification and estimation” (2002)
- R. Babbush et al., “Focus beyond quadratic speedups for error-corrected quantum advantage” (2021)
- M. Nielsen and I. Chuang, Quantum Computation and Quantum Information, chapter 6