Compare the spread of your process against the specification limits your customer set. Enter measurements and an LSL, a USL, or both, and this calculator returns Cp, Cpk, Pp, Ppk and Cpm, the expected and observed defect rate in parts per million, a sigma level, and a capability histogram with the fitted normal curves drawn over it.
New to this, or unsure how to lay out your data? Click a sample dataset below to load it straight into the table with spec limits filled in:
Use this when the rows are already in subgroup order but there is no subgroup column.
Range for subgroups up to 10, standard deviation above that. This choice affects Cp and Cpk only. Pp and Ppk always use the overall standard deviation.
Process capability analysis compares the voice of the process, meaning how much your output actually varies, against the voice of the customer, meaning the specification limits the output has to fall inside. The result is a small set of unitless indices that say how comfortably the process fits in the spec window.
An index near 1.00 means the natural spread of the process is about as wide as the spec window, so any drift starts producing defects. An index of 1.33 means the spec window is a third wider than the process needs, which is the usual minimum for an established process. An index of 2.00 is the six sigma benchmark.
Two questions, asked twice: which sigma, and is the process centered?
| Index | Formula | Question it answers |
|---|---|---|
| Cp | (USL - LSL) / (6 x sigma within) | Could the process fit, if it were perfectly centered? |
| Cpk | min of (USL - mean) and (mean - LSL), each over 3 x sigma within | Does it fit where it actually sits? |
| Pp | (USL - LSL) / (6 x sigma overall) | Same as Cp, using long-term spread. |
| Ppk | min of (USL - mean) and (mean - LSL), each over 3 x sigma overall | Same as Cpk, using long-term spread. |
| Cpm | (USL - LSL) / (6 x sqrt(sigma overall squared + (mean - target) squared)) | How far is the process from its target, not just from the limits? |
The C indices use short-term sigma, estimated from within-subgroup variation (average range over d2, or average subgroup standard deviation over c4, or the moving range for individuals). That describes the process at its best. The P indices use the plain sample standard deviation of every measurement, which also absorbs drift and shifts between subgroups. A large gap between Cp and Pp means the process is unstable rather than imprecise.
Cp and Pp only look at width, so they are blind to where the process sits. Cpk and Ppk take the smaller of the two distances to the limits, so an off-center process is penalized. Equal values mean the process is centered; Cpk well below Cp means it has drifted toward one limit and re-centring is the cheapest available improvement.
| Cpk | Rating | Defect rate if centered | Notes |
|---|---|---|---|
| 2.00 and above | Excellent | About 0.002 PPM | The six sigma benchmark for a centered process. |
| 1.67 to 2.00 | Highly capable | About 0.6 PPM | The usual requirement for safety-critical characteristics. |
| 1.33 to 1.67 | Capable | About 63 PPM | The common minimum for an established process. |
| 1.00 to 1.33 | Marginally capable | About 2,700 PPM | The process fits, but a small shift starts producing defects. |
| Below 1.00 | Not capable | Above 2,700 PPM | Process spread is wider than the spec window. |
Capability indices summarize a process whose behavior is predictable. If a control chart shows special-cause signals, fix those first: the indices will change once the process settles.
Every index and every expected PPM figure assumes a normal distribution. This calculator runs a Shapiro-Wilk test and warns you when the data does not look normal. For strongly skewed data, transform it or use a non-normal capability method instead.
With fewer than 30 measurements the indices swing widely from sample to sample. 100 or more, collected across the normal range of operating conditions, gives a figure worth quoting.
A capability study measures the process plus the measurement system. If your gauge is imprecise relative to the spec window, run a gauge R&R study before trusting a low index.
Using NumPy and SciPy, with the same estimators this calculator uses.
import numpy as np
from scipy import stats
# 20 subgroups of 5 measurements
np.random.seed(42)
data = 25.0 + np.random.normal(0, 0.02, (20, 5))
LSL, USL = 24.90, 25.10
mean = data.mean()
# Long-term (overall) sigma: every measurement pooled together
sigma_overall = data.flatten().std(ddof=1)
# Short-term (within) sigma from the average subgroup range
d2 = 2.326 # subgroup size n = 5
r_bar = (data.max(axis=1) - data.min(axis=1)).mean()
sigma_within = r_bar / d2
cp = (USL - LSL) / (6 * sigma_within)
cpk = min((USL - mean) / (3 * sigma_within), (mean - LSL) / (3 * sigma_within))
pp = (USL - LSL) / (6 * sigma_overall)
ppk = min((USL - mean) / (3 * sigma_overall), (mean - LSL) / (3 * sigma_overall))
# Expected defect rate from the long-term fit
ppm = 1e6 * (
stats.norm.cdf((LSL - mean) / sigma_overall)
+ stats.norm.sf((USL - mean) / sigma_overall)
)
print(f"Cp = {cp:.3f}")
print(f"Cpk = {cpk:.3f}")
print(f"Pp = {pp:.3f}")
print(f"Ppk = {ppk:.3f}")
print(f"Expected PPM defective = {ppm:.1f}")Using the qcc package for Cp and Cpk, plus the long-term indices by hand.
library(qcc)
# Sample data from this calculator: 20 subgroups of 5 shaft diameters (mm)
diameter <- c(
25.02, 25.01, 24.98, 25.03, 25.00, 24.97, 25.04, 24.99, 25.01, 25.02,
25.05, 24.96, 25.01, 25.03, 24.98, 25.00, 25.02, 24.99, 25.01, 24.97,
24.95, 25.03, 25.01, 24.98, 25.02, 25.04, 25.01, 24.97, 25.00, 25.03,
24.99, 25.02, 25.00, 25.01, 24.98, 25.06, 24.95, 25.03, 25.01, 24.99,
25.00, 25.02, 24.98, 25.01, 25.03, 24.97, 25.04, 25.00, 25.02, 24.99,
25.01, 24.98, 25.03, 25.00, 25.02, 24.96, 25.05, 25.01, 24.99, 25.03,
25.08, 25.06, 25.04, 25.07, 25.05, 25.00, 25.01, 24.98, 25.02, 24.99,
24.97, 25.03, 25.01, 24.99, 25.00, 25.02, 24.98, 25.01, 25.00, 24.99,
25.03, 25.01, 24.97, 25.00, 25.02, 24.99, 25.01, 25.00, 24.98, 25.03,
25.01, 24.99, 25.02, 25.00, 24.98, 25.00, 25.01, 24.99, 25.02, 25.01
)
data_matrix <- matrix(diameter, ncol = 5, byrow = TRUE)
# Cp and Cpk: qcc estimates within-subgroup sigma as Rbar/d2 by default
q <- qcc(data_matrix, type = "xbar", plot = FALSE)
process.capability(q, spec.limits = c(24.90, 25.10), target = 25.00)
# Pp and Ppk: qcc does not report these, so use the overall standard deviation
mu <- mean(diameter)
sigma_overall <- sd(diameter)
cat(sprintf("Pp = %.4f\n", (25.10 - 24.90) / (6 * sigma_overall)))
cat(sprintf("Ppk = %.4f\n", min((25.10 - mu) / (3 * sigma_overall),
(mu - 24.90) / (3 * sigma_overall))))Because short-term sigma is smaller than overall sigma, which is the normal situation: the within-subgroup estimate ignores drift between subgroups. The gap tells you how much capability you are losing to instability rather than to raw variation. Close the gap by removing the drift, not by tightening the process.
Ppk is the honest answer to what a customer will actually receive over time, and many quality standards ask for it in initial studies. Cpk describes what the process could deliver if it stayed put. Report both, along with the sample size and the period the data covers.
That is common for characteristics like strength or purity. Leave the other limit blank: Cp, Pp and Cpm are undefined with one limit, and Cpk reports the single available side (Cpu or Cpl).
Spec limits come from the customer or the design and say what is acceptable. Control limits are calculated from the data and say what the process normally does. They are unrelated quantities: a process can be perfectly in control and still produce parts outside spec, which is exactly the situation a capability study is built to detect.
The six sigma convention assumes a process mean drifts by about 1.5 sigma over the long run, so a short-term "six sigma" process is quoted at 4.5 sigma of long-run performance, or 3.4 PPM. This calculator reports the raw Z-bench values as well, so you can quote whichever convention your organization uses.