How to calculate Cpk: a step-by-step worked example
Cpk tells you how well a process fits inside its specification limits, taking both spread and centering into account. This guide walks through the calculation by hand for individual measurements, the way the AIAG SPC manual does it, and then checks the result.
The formulas
Cpk = min( (USL − X̄) / 3σwithin , (X̄ − LSL) / 3σwithin ) Cp = (USL − LSL) / 6σwithin Ppk = min( (USL − X̄) / 3σoverall , (X̄ − LSL) / 3σoverall ) Pp = (USL − LSL) / 6σoverall
- σwithin (short-term): for individual values, the average moving range divided by d2 = 1.128. For subgroups of size n, the average subgroup range divided by d2(n).
- σoverall (long-term): the ordinary sample standard deviation of all values (n − 1 in the denominator).
Worked example
A shaft diameter has LSL = 9.90 mm and USL = 10.10 mm. Twenty consecutive parts were measured:
10.029 10.032 10.005 10.008 10.004 9.999 9.975 10.029 10.054 10.002 9.966 10.018 10.026 10.019 10.035 10.049 10.022 10.031 10.001 9.970
Step 1 — Mean
Sum = 200.274, so X̄ = 200.274 / 20 = 10.0137.
Step 2 — Moving ranges and σwithin
The moving range is the absolute difference between each value and the one before it, so 20 values give 19 moving ranges (0.003, 0.027, 0.003, 0.004, …). Their sum is 0.427, so
MR̄ = 0.427 / 19 = 0.02247 σwithin = MR̄ / 1.128 = 0.01992
Step 3 — σoverall
The sample standard deviation of the 20 values is σoverall = 0.02416.
Step 4 — The indices
| Index | Calculation | Result |
|---|---|---|
| Cpu | (10.10 − 10.0137) / (3 × 0.01992) | 1.44 |
| Cpl | (10.0137 − 9.90) / (3 × 0.01992) | 1.90 |
| Cpk | min(Cpu, Cpl) | 1.44 |
| Cp | 0.20 / (6 × 0.01992) | 1.67 |
| Ppk | (10.10 − 10.0137) / (3 × 0.02416) | 1.19 |
| Pp | 0.20 / (6 × 0.02416) | 1.38 |
Cpk is set by the upper side because the mean sits above the middle of the tolerance (10.00). Cp (1.67) is higher than Cpk (1.44): centering the process would gain capability without reducing variation. Ppk (1.19) is lower than Cpk because the overall spread is larger than the short-term spread — the process wanders a little between parts. With only 20 values these estimates are rough; 100 or more values are recommended.
Check it in the free calculator
Paste the 20 values above, enter LSL 9.90 and USL 10.10, and you get the same Cpk 1.44 and Ppk 1.19 — plus a histogram and an I-MR chart.
Open the free Cpk calculator →Common mistakes
- Using the overall standard deviation for Cpk. That gives Ppk, not Cpk. Spreadsheets that use STDEV for "Cpk" are really reporting Ppk.
- Ignoring stability. Capability only predicts the future if the process is in statistical control. Look at the control chart first.
- Too few data points. For a true Cpk of 1.33, the 95% confidence interval is roughly ±0.36 with 30 values and ±0.20 with 100.
- Non-normal data. The formulas assume an approximately normal distribution. Flatness, runout and other one-sided characteristics are often skewed.
Related guides
- Cpk vs Ppk: what is the difference and which one to report?
- Nelson rules: the 8 tests for an out-of-control process
- Free Gage R&R calculator — check the gage before trusting Cpk