Amdahl's Law Calculator
Apply Amdahl's law: the speedup from running the parallel part of a program on N processors or cores, the speedup limit, parallel efficiency, time saved and Gustafson's scaled speedup.
How it works
speedup S(N) = 1 ÷ [(1 − p) + p ÷ N] · limit as N → ∞ = 1 ÷ (1 − p) · efficiency = S ÷ N · Gustafson scaled speedup = (1 − p) + p × N · p = parallel fraction of the one-processor run time
Amdahl's law (Gene Amdahl, 1967) says the serial part of a program caps the benefit of adding processors: if 10% of the run time cannot be parallelised, no number of cores can make it more than 10 times faster. Efficiency falls as N grows because the serial part does not shrink. Gustafson's law is the optimistic counterpart for workloads whose problem size grows with the machine, so the parallel part grows instead of the run time shrinking. Real speedups are lower still because of communication, synchronisation and memory bandwidth.
Worked example
A program that is 90% parallel run on 8 cores: S = 1 ÷ (0.10 + 0.90 ÷ 8) = 1 ÷ 0.2125 = 4.706×. The run takes 21.25% of the single-core time (78.75% saved) at a parallel efficiency of 58.82%. However many cores you add, the speedup can never pass 1 ÷ 0.10 = 10×, and reaching 90% of that limit takes 81 cores. Gustafson's scaled speedup for the same split is 7.3×.
Sources: Amdahl, G. (1967) — Validity of the single processor approach to achieving large scale computing capabilities, AFIPS · Wikipedia — Amdahl's law
Frequently asked questions
What does Amdahl's law say in simple terms?
The part of a job that has to run serially limits the speedup. Speeding up only the parallel part by N times leaves the serial part unchanged, so total speedup approaches 1 ÷ serial fraction.
How do I find the parallel fraction p?
Profile a single-threaded run and measure how much of the time is spent in code that can be split across threads, or fit p from two measured run times: p = (1 − T_N/T_1) ÷ (1 − 1/N).
What is the difference between Amdahl's law and Gustafson's law?
Amdahl assumes a fixed problem size and asks how much faster it runs. Gustafson assumes you scale the problem up with more processors and asks how much more work gets done in the same time, which gives a far more optimistic number.
Why is my real speedup lower than the calculator shows?
Amdahl's law ignores overheads: thread start-up, locks, cache misses, memory bandwidth limits and load imbalance. Treat the result as an upper bound.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.