Quantum Resource Estimator

RSA-4096: what Shor's algorithm would cost

RSA-4096 is often chosen as a "safer" key size. Shor's algorithm scales polynomially, so doubling the key size from 2048 bits buys roughly 8x more gates and 2x more logical qubits, not security against a large quantum computer.

How many qubits does it take to factor RSA-4096?

Using 12,365 logical qubits and 21.5 billion Toffoli gates, a surface-code machine at 0.1% physical error and 1 microsecond cycles needs code distance 31, about 25.8 million - 52.3 million physical qubits, and runs for about 7.71 days (serial depth). Order-of-magnitude planning estimate.

Precomputed with model version 2: 33% error budget, serial T-depth. Source: Gidney-Ekera 2019 scaling applied to n=4096. Serial depth.
Physical error rateHardwareCode distancePhysical qubitsRuntime
0.1%superconducting, 1 µs3125.8 million - 52.3 million7.71 days
0.05%superconducting, 1 µs2314.2 million - 28.8 million5.72 days
0.01%superconducting, 1 µs156.03 million - 12.2 million3.73 days
0.001%superconducting, 1 µs92.17 million - 4.41 million2.24 days
0.1%trapped ion, 200 µs3125.8 million - 52.3 million4.22 years
0.05%trapped ion, 200 µs2314.2 million - 28.8 million3.13 years
0.01%trapped ion, 200 µs156.03 million - 12.2 million2.04 years
0.001%trapped ion, 200 µs92.17 million - 4.41 million448 days

Try your own assumptions

Physical qubits (total)
Estimated runtime
Code distance
Data-block physical qubits
T-gate count
Physical per logical

Highlighted share: magic-state factories (conservative bound shown).

How the model works and where every constant comes from: methodology and sources.