Skip to content
ENExplore Calculators

CPI And Execution Time Calculator

Work out cpi and execution time instantly with clear inputs, formula shown and shareable results.

About CPI And Execution Time Calculator

The iron law of performance: execution time is instruction count times CPI divided by clock frequency. All three terms are levers — better code reduces instructions, better microarchitecture and memory behaviour reduce CPI, and process improvements raise frequency.

Formula

Iron law

time = instructions x CPI / frequency; IPC = 1 / CPI

Worked example

With the default values below, CPI And Execution Time Calculator returns Execution time of 1.13. Change any input above and every figure here is recalculated in your browser.

Inputs used

Instruction count
2.4 billion
Base CPI
0.85 cycles
Stall CPI
0.65 cycles
Clock frequency
3.2 GHz

Results

Execution time
1.13 s
Total CPI
1.50 cycles
Instructions per cycle
0.67 IPC
Total cycles
3,600,000,000 cycles

Step by step

  1. 1Values used
  2. 2Iron law
  3. 3Execution time= 1.13 s
  4. 4Total CPI= 1.50 cycles
  5. 5Instructions per cycle= 0.67 IPC
  6. 6Total cycles= 3,600,000,000 cycles

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take tax or fees or charges into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why is CPI split into base and stall?

Base CPI reflects the pipeline's ideal throughput; stall CPI captures cache misses, branch mispredicts and dependencies. Separating them shows where to optimise.

Can CPI be below one?

Yes, on superscalar processors. Modern wide cores achieve IPC of 2-6 on favourable code, which is a CPI of 0.17-0.5.

CPI And Execution Time Calculator | Calcrivo