Amdahl's Law Calculator

Calculate the theoretical speedup of a task when using multiple processors.

Calculator by SuperCalX: formulas, worked examples and 250+ free calculators.

Your values

Result

Enter your values and the result appears here.

Analysis

Interpretation of the current calculator output

Enter values to see detailed analysis and insights.

How to Use

Step-by-step instructions
  1. 1Enter the parallelizable portion of the task (0.0 to 1.0).
  2. 2Enter the number of processors.
  3. 3The calculator will show the speedup factor.

Theoretical Speedup

Calculates the maximum improvement in execution speed for a task that has both serial and parallel parts.
S = 1 / ((1 - p) + (p / N))

Variables:

pProportion of task that can be parallelized (0-1)
NNumber of processors

Example

50% Parallel, 2 Processors

Inputs:

p:0.5
N:2

Steps:

  1. 1.S = 1 / ((1 - 0.5) + (0.5 / 2))
  2. 2.S = 1 / (0.5 + 0.25)
  3. 3.S = 1 / 0.75 = 1.33
Result:
1.33x Speedup

Amdahl\\: the short answer

Amdahl's law gives the maximum speedup from parallel processing: S = 1 ÷ ((1 − p) + p ÷ N), where p is the fraction of work that can run in parallel and N the number of processors. If 90% of a task parallelises, 8 cores give a 4.71× speedup, and no number of cores can exceed 10×.

  • Maximum possible speedup = 1 ÷ (1 − p).
  • The serial part quickly dominates: at p = 0.95 the cap is 20×.
  • Gustafson's law offers a more optimistic view when problem size grows with processor count.

By the SuperCalX team · Reviewed by Dr. Ahmed Mortuza Saleque, founder and editor · Last reviewed · How we check our calculators

Speedup by parallel fraction

Parallel fraction4 cores8 cores64 coresLimit
50%1.60×1.78×1.97×2×
75%2.29×2.91×3.82×4×
90%3.08×4.71×8.77×10×
95%3.48×5.93×15.4×20×

What it means in practice

Before buying more cores, reduce the serial part: I/O, locks and single-threaded steps. Real speedups are usually lower than Amdahl's because of communication and memory overhead.

How to estimate the parallel fraction

The parallel fraction p is the share of the single-core run time that could be split across cores. Profile the program on one core and add up the time spent in parts that can run independently, such as per-item loops, image tiles or independent requests. Divide by the total time.

You can also work backwards from a measurement. If a program runs in 100 s on 1 core and 40 s on 4 cores, the speedup is 2.5. Rearranging Amdahl's law gives p = (1 − 1 ÷ S) ÷ (1 − 1 ÷ N) = (1 − 0.4) ÷ (1 − 0.25) = 0.8, so about 80% of the work is parallel.

Parallel efficiency

Efficiency is speedup divided by the number of cores. At p = 0.9, 8 cores give a 4.71× speedup, an efficiency of 4.71 ÷ 8 = 59%. At 64 cores the speedup is 8.77×, only 14% efficiency. Past a certain point, extra cores mostly sit idle waiting for the serial part.

Speedup and efficiency at p = 0.9.

CoresSpeedupEfficiency
21.82×91%
43.08×77%
84.71×59%
166.40×40%
648.77×14%

Amdahl's law and Gustafson's law

Amdahl's law assumes the problem stays the same size as cores are added (strong scaling). Gustafson's law assumes the problem grows to fill the extra cores (weak scaling), giving a scaled speedup of S = N − (1 − p)(N − 1). With p = 0.9 and 64 cores that is 64 − 0.1 × 63 = 57.7×.

Use Amdahl's law when the job is fixed, such as rendering one video faster. Use Gustafson's law when more cores let you take on a bigger job in the same time, such as a finer simulation grid.

Beyond computer programs

The same reasoning applies to any process with a fixed serial step. If a team project spends 20% of its time on one reviewer's approval, adding developers can never make it more than 5 times faster. It is also used for single-part upgrades: if a faster disk speeds up the 30% of run time spent on I/O by 3×, the overall speedup is 1 ÷ (0.7 + 0.3 ÷ 3) = 1.25×.

Worked examples

p = 0.9, N = 8

  1. S = 1 ÷ (0.1 + 0.9 ÷ 8) = 1 ÷ 0.2125.

4.71× faster.

Finding p from a benchmark

  1. 1 core: 100 s. 4 cores: 40 s. Speedup S = 2.5.
  2. p = (1 − 1 ÷ 2.5) ÷ (1 − 1 ÷ 4) = 0.6 ÷ 0.75 = 0.8.
  3. Predicted 16-core speedup = 1 ÷ (0.2 + 0.8 ÷ 16) = 1 ÷ 0.25 = 4×.

About 80% parallel, so 16 cores would give only about 4×.

Common mistakes

  • Entering 90 instead of 0.9 for the parallel portion.
  • Assuming the measured speedup will keep rising in a straight line as cores are added.
  • Ignoring overhead: thread start-up, locks and memory bandwidth make real speedups lower than the formula predicts.

Amdahl\\ FAQ

Why does adding processors give diminishing returns?

The serial part of the work does not get faster, so it takes a growing share of the total time.

Who was Amdahl?

Gene Amdahl, a computer architect at IBM, who presented the argument in 1967.

Can speedup ever exceed the number of cores?

Not under Amdahl's model. In practice, "superlinear" speedup sometimes appears when splitting the data lets each part fit in a faster cache, but that is a memory effect, not a breach of the law.

Does Amdahl's law apply to GPUs?

Yes. A GPU may offer thousands of parallel threads, but the serial parts of the program, such as copying data to the GPU and running the CPU-side code, still cap the overall speedup.

How do I convert a percentage to p?

Divide by 100. If 85% of the work is parallel, enter p = 0.85.

What is the max speedup?

As N approaches infinity, the speedup is limited by the serial portion (1 - p). For p=0.5, max speedup is 2x no matter how many processors you add.

Add this calculator to your website

Teachers, bloggers and businesses can show the Amdahl\\ on their own pages for free. Copy this code and paste it into your page's HTML:

Please keep the credit link so readers can find the formula, worked examples and guide.