Calculate MIPS (million instructions per second) from instruction count and execution time, or from clock rate and CPI, and solve for count, time or CPI.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
MIPS from instruction count and timeFinds instruction throughput in MIPSRequires the instruction count and the execution time
Instruction count from MIPS and timeFinds how many instructions run in a timeRequires the instruction throughput and the execution time
Execution time from count and MIPSFinds how long a number of instructions takesRequires the instruction count and the instruction throughput
MIPS from clock rate and CPIFinds per-core MIPS from processor figures, plus the ideal total across coresRequires the clock rate, the average cycles per instruction and the number of identical active cores
Weighted CPI from instruction mixFinds the average cycles per instruction for a mix of instruction typesRequires the share and the cycles per instruction of up to four instruction types, with shares that total 100%

Instruction counts can be entered plainly or in thousands (K), millions (M) or billions (G), time from microseconds to hours, throughput in IPS, KIPS, MIPS or GIPS, and clock rate in Hz, kHz, MHz or GHz. The clock rate function takes an optional instruction count to give the single-core CPU time. The instruction mix function takes an optional clock rate to turn its CPI into throughput.

MIPS Formula

MIPS = IC ÷ (ET × 10⁶) [1]
MIPSMillions of instructions per second
ICInstruction count, the instructions executed
ETExecution time (s)

MIPS is an instruction execution rate: the instructions a processor completes, divided by the time taken and by one million [1].

MIPS from instruction count and time

The main formula applies directly. A program that executes 12,000,000 instructions in 5 s runs at 12,000,000 ÷ (5 × 10⁶) = 2.4 MIPS.

Instruction count from MIPS and time

IC = MIPS × 10⁶ × ET

At 2.4 MIPS, 5 s of execution covers 12,000,000 instructions.

Execution time from count and MIPS

ET = IC ÷ (MIPS × 10⁶) [1]

12,000,000 instructions at 2.4 MIPS take 5 s.

MIPS from clock rate and CPI

MIPS = f ÷ (CPI × 10⁶) [1]

f is the clock rate in Hz and CPI is the average number of clock cycles per instruction. A 30 MHz processor averaging 2.1 cycles per instruction runs at 30,000,000 ÷ (2.1 × 10⁶) = 14.29 MIPS. The same figures give the execution time of a program as IC × CPI ÷ f [1], so 12,000,000 instructions take 0.84 s. The total across cores is the per-core figure times the number of cores, 57.14 MIPS for four.

Weighted CPI from instruction mix

CPI = Σ (share × cycles)

Each instruction type's cycle count is weighted by its share of the instructions executed. A program that is 25% load and store at 3 cycles, 60% arithmetic at 2 cycles and 15% branches at 1 cycle averages 0.25 × 3 + 0.60 × 2 + 0.15 × 1 = 2.1 cycles per instruction [2]. Instructions per cycle, IPC, is 1 ÷ CPI.

Limits of This Estimate

  • MIPS cannot compare processors with different instruction sets, because the instruction count for the same task differs between them [1].
  • MIPS changes from program to program on the same computer, so a processor has no single MIPS rating, and a higher MIPS figure does not always mean the work finishes sooner [1].
  • The total across cores assumes identical cores doing independent work. Shared memory, serial sections and coordination between cores make real speedup smaller.

Sources

  1. King Fahd University of Petroleum and Minerals, COE 233 lecture notes, CPU Performance (M. Mudawar): MIPS from instruction count and time, MIPS from clock rate and CPI, execution time, and the drawbacks of MIPS
  2. Cornell University, CS 3410 lecture notes, Performance: average CPI as a weighted sum over the instruction mix, with the 2.1 CPI example