Cp / Cpk calculator

Paste measurements — or type a mean and a sigma — with your tolerance, and get Cp, Cpk, Pp, Ppk, the sigma level and the expected parts per million out of spec.

How you calculate Cpk in Excel

There is no Cpk function, so you build it: (USL − mean) / (3 × sigma) and (mean − LSL) / (3 × sigma), then MIN of the two. AVERAGE gives the mean and STDEV.S the sigma, which makes the whole thing one cell once the readings are in a column.

That formula computes Ppk and calls it Cpk. STDEV.S is the overall standard deviation of every reading you have; Cpk is defined on within-subgroup sigma, estimated as R̄/d₂, which deliberately excludes the movement between subgroups. The two agree only on a process that never shifted — and if it never shifted you did not need the distinction. Quoting one without saying which sigma it used is the usual way a capability number misleads a customer.

The worked example, with both sigmas computed side by side

Nothing you paste leaves this calculation. It is not stored, not logged and not sent anywhere else — the numbers are computed and returned, and that is all. Paste straight out of a spreadsheet — tab-separated columns are understood as they land.

One reading per line, or a row per subgroup. Commas, tabs and semicolons all work; a header row is ignored.

How this is calculated

Capability compares the width of your tolerance to the width of your process. Cp is the ratio of the two; Cpk penalises the process for sitting off centre, so it can never be larger than Cp and is the number worth quoting.

Cp  = (USL − LSL) / 6σ
CPU = (USL − x̄) / 3σ
CPL = (x̄ − LSL) / 3σ
Cpk = min(CPU, CPL)

The part most people get wrong

Which sigma. Cp and Cpk use within-subgroup variation — estimated from R̄/d₂ across subgroups, or from the mean moving range for individual readings. Pp and Ppk use the plain sample standard deviation of everything. If your process shifts between subgroups, the two disagree, and that gap is the interesting result: the process is capable of better than it is currently delivering. A capability number with no stated sigma is not a result, it is a rumour.

Two follow-on questions this page invites: how certain is that Cpk from this many parts? and what PPM does it imply?

Two assumptions worth stating

  • The process is stable. Capability on an out-of-control process describes something that will not happen again. Chart it first — that is what the chart generator is for.
  • The data is roughly normal. The expected PPM figure comes from the normal distribution. For a skewed characteristic (flatness, roundness, anything bounded at zero) treat it as indicative only.

What the Excel version will not do

d₂ is not in Excel
The constant that converts R̄ into within-subgroup sigma depends on your subgroup size and lives in a printed table. Typed in wrong, it produces a Cpk that looks entirely normal.
Capability on an unstable process is a number about the past
Cpk predicts future output only if the process is in control. Nothing in a spreadsheet checks that first, and the check has to come first — otherwise you are extrapolating from a process that is still moving.
No confidence interval
A Cpk of 1.33 from thirty pieces has a 95% interval of roughly 0.97 to 1.69, which does not demonstrate a requirement of 1.33. Excel returns the point estimate with no hint of how soft it is.

Questions people ask about this

What is the difference between Cpk and Ppk?

Cpk uses within-subgroup variation — sigma estimated from R̄/d₂ across subgroups, or from the mean moving range for individual readings. Ppk uses the plain sample standard deviation of every reading. When the process shifts between subgroups the two disagree, and that gap is the useful result: the process is capable of better than it is currently delivering. Quoting either without saying which sigma it used is how capability numbers mislead.

What is a good Cpk value?

1.33 is the usual customer requirement, and 1.67 is common for safety-critical or automotive characteristics. A Cpk of 1.00 means the nearest specification limit sits exactly three sigma from the mean, which is roughly 1,350 defective parts per million on that side. Below 1.00 the process is producing out-of-tolerance parts as a matter of routine.

Why is my Cpk lower than my Cp?

Because the process is off centre. Cp only compares the width of the tolerance to the width of the process and ignores where it sits; Cpk penalises the distance to the nearer limit. Cpk can never exceed Cp, and a large gap between them means centring the process would gain more than reducing its variation.

Can I calculate Cpk from a mean and standard deviation?

Yes — tick "I already know the mean and sigma" and enter them with your tolerance. Be aware that a single sigma cannot distinguish within-subgroup from overall variation, so you get Cp and Cpk only, and they are only as good as the sigma you supplied.

How many parts do I need for a capability study?

More than most studies use. Thirty pieces gives a Cpk of 1.33 a 95% confidence interval of roughly 0.97 to 1.69, which is not enough to prove a requirement of 1.33. The Cpk confidence calculator shows the interval for your own number and sample size.

Cpk is only a forecast if the process is in control.

A workspace charts the readings first, tells you whether the process was stable over the window you are quoting, and computes capability from within-subgroup sigma on that basis — with Ppk beside it, so the gap between them is visible rather than a matter of which formula somebody used.

More capability tools

  • Cpk confidence interval & sample size — A Cpk of 1.33 from 30 pieces has a 95% interval of roughly 0.97 to 1.69. See the uncertainty in your own number, and how many parts would settle it.
  • Cpk ↔ PPM ↔ sigma level converter — What PPM is a Cpk of 1.33? What Cpk does 3.4 PPM need? Both conventions shown side by side, because the 1.5 sigma shift is why two sources disagree by a factor of ten.

Everything else

  • Control limit calculator — Give it subgroups or individual readings and it returns the control limits for the chart, the range or sigma chart beneath it, and every constant it used to get there.
  • Control chart generator — Paste a column of numbers, or rows of subgroups, and get a real control chart: limits from the data, Nelson rules 1–4 evaluated, out-of-control points marked.
  • Nelson & Western Electric rules checker — Every run rule evaluated on your data, each violation named in plain English with what it usually indicates — a shift, a trend, tool wear, two machines mixed.
  • Control chart constants — The whole table, n = 2 to 25, with the formula each constant belongs to. The same values the charts on this site are computed from.
  • X̄-R chart calculator — Subgroups in, X̄ and R charts out — limits from A₂, D₃ and D₄, run rules evaluated, and the range chart shown first because it decides whether the averages chart can be trusted.
  • X̄-s chart calculator — For subgroups big enough that the range wastes them. Limits from A₃, B₃ and B₄, sigma recovered with the c₄ correction, and the s chart read first because it decides whether the averages chart can be trusted.
  • I-MR chart calculator — For processes that give you one number at a time — a batch, an oven, a destructive test. Limits from the mean moving range, run rules evaluated, and an honest note about what an individuals chart cannot see.
  • Levey-Jennings chart with Westgard rules — Paste your QC results with the assigned mean and SD from the package insert, and get the chart with every sigma band drawn and all six Westgard rules evaluated — each one named, and labelled random or systematic error.
  • Bland-Altman plot — Paired readings from two methods, plotted as difference against average — with the bias, the limits of agreement, their confidence intervals, and a test for whether the disagreement depends on the magnitude.
  • Pareto chart generator — Categories and counts in, ranked bars and the cumulative line out — with the vital few named, an "Other" bucket that always sorts last, and an honest warning when the distribution is flat and there is no dominant cause to attack.
  • Box and whisker plot generator — One column per group, boxes side by side. Quartiles, the 1.5×IQR fences, whiskers that stop at real readings and outliers drawn individually — with the quartile method stated, because that is why your plot and Excel's disagree.
  • Histogram and normality test — A histogram with the fitted normal curve, both standard bin rules with a reasoned recommendation, and an Anderson-Darling test that refuses to tell you your data is normal — because no test can.
  • Gage R&R calculator (ANOVA) — Paste a crossed study — part, operator, reading — and get the full ANOVA: repeatability and reproducibility separated, the part-by-operator interaction tested rather than assumed away, %GRR, %Tolerance and ndc against AIAG's bands.
  • p, np, u and c chart calculator — Counted data rather than measured: proportion defective, number defective, defects per unit. Limits that step with the sample size instead of pretending it never changed, and an honest warning when the counts are too low for three-sigma limits to mean anything.
  • Grubbs outlier test — The G statistic against its critical value, the p-value, and the point implicated — plus a straight answer about what to do next, which is almost never to delete the reading.
  • Scatter diagram and correlation — Paired readings plotted, with Pearson r, Spearman rho, r², the least-squares line and its p-value — and the two reported together, because when they disagree the disagreement is the finding.
  • Standard deviation calculator — The usual summary statistics, and the thing a spreadsheet will not tell you: the within-subgroup sigma a control chart uses, beside the overall sigma a textbook means. The gap between them is why Cpk and Ppk disagree.