Interactive Calculator · Noise and Error Correction
Surface Code Overhead Calculator
Turn a physical error rate and an algorithm size into a code distance, a physical qubit count, and a runtime.
Error per physical operation, including measurement, in the error-correction circuit.
Around 0.6% to 1% for the surface code under circuit-level noise.
Each logical step takes d rounds of error correction.
Extra qubits for lattice surgery routing and T-state factories. Published estimates are often 1.5× to 3×.
Code distance d
23
Smallest odd distance that meets the budget
Physical qubits per logical
1,057
2d² − 1 for a rotated surface code patch
Total physical qubits
158,550
100 logical × 1.5× overhead
Runtime
38.33 minutes
100,000,000 steps × d rounds × 1 µs
Error budget
Per-round logical error budget: 4.35×10⁻¹³. The code reaches 1.00×10⁻¹³ at d = 23.
Logical error per round versus code distance
Estimate the surface code distance, physical qubits per logical qubit, total physical qubits, and runtime needed to run an algorithm of a given size, using either a threshold model or a measured error-suppression factor.
What this calculator does
Quantum error correction promises reliable computation from unreliable qubits, but the price is overhead. A single logical qubit is encoded across many physical qubits, and the more reliable you need it to be, the more physical qubits you spend. For the surface code, the leading candidate for the first fault-tolerant machines, the overhead is set by one number: the code distance d. A distance-d patch uses roughly 2d² physical qubits and suppresses logical errors exponentially as d grows, provided the physical error rate is below a threshold.
This calculator connects the dots. You enter the physical error rate, the size of the algorithm in logical qubits and logical time steps, the total failure probability you can tolerate, and a few engineering parameters. It finds the smallest odd code distance that keeps the total failure probability within budget, then reports the physical qubits per logical qubit, the total physical qubits including overhead for routing and magic-state factories, and the runtime. The chart shows how the logical error per round falls with distance for your error rate and for neighboring values, so you can see how much a better chip would save.
How to use it
Begin with the preset called Good target, p = 0.1%. With a threshold of 1 percent, each increase of the distance by 2 suppresses the logical error by a factor of ten, since the ratio p to p_th is one tenth. Setting the algorithm to 100 logical qubits and 10 million logical steps with a 10 percent total failure budget gives a distance of 21, 881 physical qubits per logical qubit, and about 132,000 physical qubits overall. Runtime is about 3.5 minutes at a one microsecond cycle.
Now move the physical error rate up to 0.5 percent. The ratio p to p_th rises to one half, so each step of 2 in distance suppresses errors by only a factor of two, and the required distance jumps to 73 with about 1.6 million physical qubits, twelve times more than before. This is the most important lesson of the calculator: overhead explodes as you approach threshold, and every factor of two in physical error rate buys a large saving. Then try the RSA-scale algorithm preset, which uses 1,500 logical qubits and a billion logical steps. It gives a distance of 27 and about 3.3 million physical qubits at 0.1 percent error, within a factor of a few of the 20 million qubits in the 2019 estimate by Gidney and Ekerå, whose estimate includes many details this simplified model does not.
The second error model replaces the threshold formula with a measured suppression factor Λ. Google Quantum AI reported in 2024 that the logical error of its surface-code memory fell by about a factor of 2.14 each time the distance grew by 2, with a logical error of 0.143 percent per round at distance 7. Choose that preset to see how a measured Λ compares to the idealized threshold curve. Notice how sensitive the result is to Λ: a Λ of 4 instead of 2 cuts the distance needed by about half and the qubit count by about three quarters.
Reading the result
The code distance is the number that determines everything else. Odd distances are used because they allow a majority vote among data qubits. The per-logical overhead of 2d² − 1 comes from the data qubits of a rotated surface code patch plus its measurement qubits. The multiplier you set covers lattice surgery routing between logical qubits and the factories that produce magic states for non-Clifford gates, which in published estimates can take half or more of the machine, though newer methods such as magic state cultivation aim to shrink them.
Runtime follows from the cycle time. Each logical time step takes about d rounds of syndrome extraction, so a distance-27 machine with one-microsecond rounds performs about 37,000 logical steps per second. Slower platforms, such as ions or neutral atoms with millisecond cycles, pay a proportionally longer runtime for the same distance, though they may need fewer qubits if they use denser codes.
Assumptions and limits
The simplified formulas assume independent, identically distributed noise, a fixed prefactor of 0.1, and that every logical qubit sits in a patch of identical distance. Real fault-tolerant compilations vary the distance in different parts of the machine, use more efficient codes such as qLDPC codes, and account for decoder reaction time, which this calculator ignores. The overhead multiplier is a single number standing in for routing, factories, and idle space. The model also ignores correlated errors, leakage, and measurement error beyond what the threshold already captures. Use it to understand scaling, to compare scenarios, and to sanity-check published estimates, not to specify hardware.
The formulas behind it
Logical error per round
p_L(d) ≈ 0.1 · (p / p_th)^((d + 1)/2)
Standard empirical form for the surface code below threshold, with prefactor about 0.1.
Measured-suppression form
p_L(d) = ε₃ · Λ^(−(d − 3)/2)
Λ is the factor by which the logical error drops when d increases by 2.
Failure budget
p_L(d) × Q × T × d ≤ target
Q logical qubits, T logical time steps, each taking d rounds.
Qubits per logical qubit
N = 2d² − 1
Data plus measurement qubits in a rotated surface code patch.
Total physical qubits
N_total = N × Q × (overhead multiplier)
The multiplier covers routing and magic-state factories.
Runtime
t = T × d × t_cycle
Each logical step uses d rounds of syndrome extraction.
Worked examples
A small chemistry-style run
- p = 0.1%, p_th = 1%, Q = 100, T = 10⁷, total failure 10%.
- Condition: 0.1 × 0.1^((d+1)/2) × 10⁹ × d ≤ 0.1, which first holds at d = 21.
- Qubits per logical = 2 × 441 − 1 = 881, total = 881 × 100 × 1.5 = 132,150.
ResultAbout 132,000 physical qubits and a 3.5 minute runtime at a 1 µs cycle.
An RSA-scale algorithm
- p = 0.1%, Q = 1,500, T = 10⁹, total failure 10%.
- The condition first holds at d = 27, with 1,457 qubits per logical qubit.
- Total = 1,457 × 1,500 × 1.5 ≈ 3.3 million; runtime = 10⁹ × 27 × 1 µs ≈ 7.5 hours.
ResultSame distance as Gidney and Ekerå (d = 27); their larger 20 million qubit total includes factories and layout details.
Near the threshold
- p = 0.5%, the same small run (Q = 100, T = 10⁷).
- The ratio p/p_th = 0.5, so d rises to 73 with 10,657 qubits per logical qubit.
ResultAbout 1.6 million physical qubits, twelve times the 0.1% case: error rate matters enormously.
Frequently asked questions
Why must the physical error rate be below threshold?
Above threshold, adding more qubits adds more places for errors to occur than the code can correct, so logical error grows with distance.
Why does a Λ of 2.14 matter so much?
It is the measured improvement factor per step. Roadmaps need Λ well above 2, because each logical error target of 10⁻⁹ or lower requires many steps in distance.
Do other codes need fewer qubits?
Yes. Quantum LDPC codes can use several times fewer physical qubits per logical qubit for memory, at the cost of longer-range connections.
References
- Fowler, A. G., Mariantoni, M., Martinis, J. M., & Cleland, A. N. (2012). Surface codes: Towards practical large-scale quantum computation. Physical Review A, 86, 032324.
- Dennis, E., Kitaev, A., Landahl, A., & Preskill, J. (2002). Topological quantum memory. Journal of Mathematical Physics, 43, 4452-4505.
- Raussendorf, R., & Harrington, J. (2007). Fault-tolerant quantum computation with high threshold in two dimensions. Physical Review Letters, 98, 190504.
- Google Quantum AI and collaborators (2025). Quantum error correction below the surface code threshold. Nature, 638, 920-926.
- Gidney, C., & Ekerå, M. (2021). How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum, 5, 433.
- Litinski, D. (2019). A game of surface codes: Large-scale quantum computing with lattice surgery. Quantum, 3, 128.
- Beverland, M. E., et al. (2022). Assessing requirements to scale to practical quantum advantage. arXiv:2211.07629.
Keep exploring
- Paper: Surface Codes: Towards Practical Large-Scale Quantum Computation
- Paper: Quantum Error Correction Below the Surface Code Threshold
- Paper: How to Factor 2048 Bit RSA Integers in 8 Hours Using 20 Million Noisy Qubits
- Term: Surface Code
- Forecast: Logical Qubits: How Many, How Good, and When
- Forecast: How the Cost of Useful Quantum Computing Keeps Falling
These calculators use simplified, published models for education and planning. Real devices and systems differ, so treat results as estimates. They are not engineering, investment, legal, or security advice.