Amdahl's Law Calculator
Enter the parallelizable fraction of your workload and the number of processors to get the theoretical speedup predicted by Amdahl's Law. You also get parallel efficiency, the maximum achievable speedup (with infinite processors), the improved execution time, and a chart showing how speedup scales with core count. Switch to the reverse mode to find how many processors you need to hit a target speedup.
What is Amdahl's Law?
Amdahl's Law is a formula introduced by computer architect Gene Amdahl in 1967 to quantify how much faster a program can run when you add more parallel processing units. The key insight is that every program has a serial (sequential) portion that cannot be parallelized: waiting for disk I/O, locking a shared resource, or running initialization code. That serial portion sets a hard ceiling on speedup regardless of how many cores you throw at the problem. If 10% of your workload must run sequentially, then even with a million cores you can achieve at most 10x speedup - the other 90% is fully parallelized, but the 10% serial section is the bottleneck. The formula is: S = 1 / ((1 - p) + p/n), where S is speedup, p is the parallelizable fraction (0 to 1), and n is the number of processors.
How to use this calculator
Use Speedup mode to find out how fast your program will run on a given number of cores. Enter the parallelizable fraction (as a decimal between 0 and 1), the processor count, and optionally the original execution time. The calculator returns the theoretical speedup, parallel efficiency, maximum achievable speedup, and the improved execution time. Use Processors Needed mode to work backwards: enter the fraction and a target speedup, and the tool tells you the minimum number of processors required. The chart shows how speedup scales from 1 to 64 cores alongside the ideal linear speedup and the theoretical maximum limit, so you can immediately see the point of diminishing returns.
Parallel efficiency and the point of diminishing returns
Parallel efficiency is speedup divided by the number of processors. Perfect linear scaling would give efficiency of 1.0 (100%), meaning every core contributes equally. In practice, the serial fraction drags efficiency down as you add more cores. At 8 cores with 80% parallelization you get about 3.8x speedup and 48% efficiency. At 64 cores the speedup grows to 4.7x but efficiency falls to 7.4%. This is the classic Amdahl diminishing-returns curve: after a certain point, each additional core costs more (in power, cooling, cost, and software complexity) than it contributes. Parallel efficiency lets you decide when to stop adding cores.
Amdahl's Law versus Gustafson's Law
Amdahl's Law fixes the problem size and asks how fast you can solve it with more processors. Gustafson's Law (1988) takes the opposite view: with more processors you often choose to solve a bigger problem in the same amount of wall-clock time. Gustafson's scaled speedup is S = n - p * (n - 1), where the focus is on the total work done rather than a fixed workload. In scientific computing, where larger grids or longer simulations become tractable with more hardware, Gustafson's formulation is more realistic. Amdahl's Law is more relevant for latency-sensitive tasks where you need to finish a fixed job as fast as possible.
Amdahl speedup limits by parallel fraction
| Parallel fraction (p) | Max speedup (inf. cores) | Speedup at 8 cores | Speedup at 64 cores |
|---|---|---|---|
| 50% (0.50) | 2.00x | 1.78x | 1.98x |
| 75% (0.75) | 4.00x | 3.20x | 3.84x |
| 80% (0.80) | 5.00x | 3.81x | 4.74x |
| 90% (0.90) | 10.00x | 6.40x | 9.14x |
| 95% (0.95) | 20.00x | 9.14x | 16.97x |
| 99% (0.99) | 100.00x | 13.91x | 39.28x |
Theoretical maximum speedup (infinite cores) and practical speedup at 8 and 64 cores for common parallelizable fractions.
Frequently asked questions
What does the parallelizable fraction mean?
The parallelizable fraction (p) is the proportion of your total workload that can be divided across multiple processors and run simultaneously. The remaining fraction (1 - p) must run serially: file I/O, initialization, synchronization barriers, and any code that depends on the output of a previous step. A fraction of 0.9 means 90% of the work can run in parallel and 10% must run sequentially. You can estimate this by profiling your application and adding up the time spent in sections that cannot be parallelized.
What is the maximum speedup, and why can't I exceed it?
The maximum speedup is 1 / (1 - p), the limit as the number of processors approaches infinity. With p = 0.8, the maximum is 1 / 0.2 = 5x, no matter how many cores you use. This hard ceiling exists because the serial portion always takes the same absolute time - more cores can only reduce the parallel portion's contribution to zero, but the serial time remains. This is why reducing the serial fraction is usually more valuable than buying more hardware.
What is parallel efficiency and what is a good value?
Parallel efficiency is speedup divided by the number of processors, expressed as a percentage. It tells you how productively each core is being used. An efficiency of 100% means perfect linear scaling: doubling cores exactly doubles speed. In practice, values above 85% are excellent, 60-85% are good, 35-60% are moderate, and below 35% means most cores are wasted waiting on the serial section. Efficiency always falls as you add more cores, so there is a practical sweet spot between raw speedup and cost.
How do I find my workload's parallelizable fraction?
Profile your application using a performance profiler such as perf (Linux), Instruments (macOS), or VTune (Intel). Identify sections that run in a strictly sequential order and sum their execution times. Divide that serial time by the total runtime to get 1 - p; subtract from 1 to get p. Alternatively, run the workload on 1, 2, 4, and 8 cores and fit the speedup data to the Amdahl formula to back out p empirically.
What is the difference between Amdahl's Law and Gustafson's Law?
Amdahl's Law assumes a fixed problem size and asks how much faster you can finish it with more processors. Gustafson's Law assumes fixed wall-clock time and asks how much more work you can do. For latency-critical applications (serving a web request, rendering a single frame), Amdahl is the right model. For throughput-oriented or scientific workloads where you scale the problem with the hardware (larger simulation grids, more Monte Carlo trials), Gustafson's Law gives a more optimistic and often more accurate picture.
Can the speedup ever exceed the maximum?
No, not within the Amdahl model. The formula guarantees S <= 1 / (1 - p) for any finite number of processors. In real systems a phenomenon called super-linear speedup can occasionally occur when more processors mean more total cache, reducing cache misses and making the parallel version faster per operation than the serial baseline. This is outside the scope of Amdahl's model, which assumes the only gain comes from parallel execution.