Skip to content
ENExplore Calculators

CPU Utilization Calculator

Calculate CPU utilization percentage from user, system and idle time measurements.

About CPU Utilization Calculator

The Linux kernel exposes cumulative CPU time counters in /proc/stat, measured in jiffies since boot. Taking two snapshots and computing the delta of each field (or using cumulative totals as a rough single-point estimate, as here) lets you derive utilization: the busy time is user + nice + system + irq + softirq + steal, and total time additionally includes idle and iowait. Dividing busy by total gives the percentage of CPU time spent doing work.

Formula

CPU usage percentage

usage% = 100 × (user+nice+system+irq+softirq+steal) / (user+nice+system+idle+iowait+irq+softirq+steal)

u
user
n
nice
s
system
i
idle
w
iowait
q
irq
f
softirq
t
steal

Worked example

With the default values below, CPU Utilization Calculator returns CPU Usage of 31.72%. Change any input above and every figure here is recalculated in your browser.

Inputs used

userminimum 0
5,000
niceminimum 0
100
systemminimum 0
2,000
idleminimum 0
15,000
iowaitminimum 0
500
irqminimum 0
50
softirqminimum 0
50
stealminimum 0
0

Results

CPU Usage
31.72%
Idle
66.08%
I/O Wait
2.20%
Total Jiffies (sum of all counters)
22,700

Step by step

  1. 1Values used
  2. 2CPU usage percentage
  3. 3CPU Usage= 31.72
  4. 4Idle= 66.08
  5. 5I/O Wait= 2.20
  6. 6Total Jiffies (sum of all counters)= 22,700

Assumptions and limits

  • The result is derived only from the 8 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency 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

Should I use cumulative counters or deltas between two samples?

For an accurate instantaneous reading, take two /proc/stat snapshots a second or two apart and feed the *differences* of each field into this calculator — that is what `top` and `mpstat` do internally. Using raw cumulative totals from boot gives an average over the machine's entire uptime.

What does the steal field represent?

Steal time is CPU time a virtual machine's guest OS was ready to run but the hypervisor gave the physical CPU to another guest instead — a useful signal of noisy-neighbor contention on shared virtualized or cloud hosts.

Why is iowait excluded from busy time?

iowait represents idle time where the CPU had no runnable task but was waiting on a pending disk I/O — the CPU wasn't actually executing instructions, so it counts toward idle capacity, not utilization.

CPU Utilization Calculator – Calculate CPU Usage & Idle