How to Calculate Cpk: Formula and Step-by-Step Example

By James C on October 21, 2026

how-to-calculate-cpk

Cpk tells you how close your process runs to the nearest spec limit, measured in units of three standard deviations. This guide shows how to calculate Cpk by hand, step by step, with a worked shaft example. You need three things: your measurements, the spec limits, and subgroups kept in production order. Not sure which index you need? Start with Cp vs Cpk.

Process capability calculation

From raw measurements to Cpk in seven steps

The math is short. The judgment around it is what matters: picking the right sigma, checking the chart first and reading the result honestly. This page covers all three.

What you need before you start
01
MeasurementsAbout 25 subgroups or 100 values
02
Spec limitsLSL and USL from the drawing
03
Production orderValues kept in the sequence they were made

The Cpk formula (and the Cp formula)

Both indices compare the spec with the process spread. Cp looks at spread only. Cpk adds the position of the mean, so it is the one that reflects what the process is making today.

Cpk
Cpk = min[(USL − mean) / (3σ), (mean − LSL) / (3σ)]
Spread and position. Keep the smaller side.
Cp
Cp = (USL − LSL) / (6σ)
Spread only. Assumes a perfectly centered process.

Which sigma goes into the formula

For Cpk, σ is the within-subgroup, or short-term, sigma. It describes how much parts vary over a short run, without the drift between runs. How you estimate it depends on how you collected the data.

Subgroups
σ = R-bar / d2

R-bar is the average range of your subgroups. The d2 constant depends on subgroup size.

Individuals
σ = MR-bar / 1.128

MR-bar is the average moving range of consecutive values, kept in production order.

d2 constants by subgroup size

Subgroup size (n)
2
3
4
5
6
7
8
9
10
d2
1.128
1.693
2.059
2.326
2.534
2.704
2.847
2.970
3.078

How to calculate Cpk step by step

Work through these seven steps in order. Skipping the second one is the most common reason a Cpk number falls apart later.

  1. Collect the data. Gather about 25 subgroups or 100 individual values, recorded in production order. Note the spec limits from the drawing: LSL and USL.
  2. Check stability. Plot an X-bar and R chart for subgroups, or an individuals chart for single values. If points fall outside the control limits or show clear patterns, find the cause first. Capability only means something for a stable process.
  3. Calculate the mean. For subgroups, average the subgroup means to get the grand mean. For individuals, average all the values.
  4. Estimate the within sigma. For subgroups, use σ = R-bar / d2 with the d2 constant for your subgroup size. For individuals, use σ = MR-bar / 1.128.
  5. Calculate Cpu and Cpl. Cpu = (USL − mean) / (3σ). Cpl = (mean − LSL) / (3σ).
  6. Take the smaller value as Cpk. The side closer to its limit is the side that will make rejects, so it sets the score.
  7. Compare with the required value. Check the result against what your customer or control plan asks for. For typical targets, see what a good Cpk value looks like.

Worked example

Here is a complete Cpk calculation example on a turned shaft diameter.

The inputs

Spec25.00 ± 0.05 mm
LSL / USL24.95 / 25.05
Data25 subgroups of 5
Grand mean25.012
R-bar0.030

The results

Value
Calculation
Result
Within sigma
0.030 / 2.326 (d2 for n = 5)
0.0129
Cp
0.10 / (6 × 0.0129)
1.29
Cpu
(25.05 − 25.012) / (3 × 0.0129)
0.98
Cpl
(25.012 − 24.95) / 0.0387
1.60
Cpk
Smaller of Cpu and Cpl
0.98
Expected above USL
Estimate, assumes normal data
About 1,600 ppm
Where the process sits
Mean 25.012





LSL 24.95Target 25.000USL 25.05
Shaded band: mean ± 3σ. It reaches just past the upper limit, which is where the expected rejects come from.

What the numbers say

The spread is acceptable: Cp is 1.29. The problem is position. The mean sits 0.012 mm above nominal, so the upper side has less room and Cpu sets the score at 0.98. The estimate of about 1,600 parts per million above the upper limit assumes normal data, so treat it as a rough guide. Centering the process at 25.000 would lift Cpk to about 1.29, with no change to the spread.

Skip the hand math on your next study

Get Cp, Cpk, Pp and Ppk from your own data: paste your measurements and get a one-page capability report. 14-day free trial, no card needed.

Example result
Cp1.29
Cpk0.98
Mean 0.012 mm high. Re-centering at 25.000 lifts Cpk to about 1.29.

Common mistakes

Most wrong Cpk values come from the inputs, not the arithmetic. Watch for these five.

Using the standard deviation of all the data

Running STDEV across every value gives the overall sigma. That produces Ppk, not Cpk. The overall figure includes drift between subgroups, so it can be larger.

Fix: use R-bar / d2 or MR-bar / 1.128.

Mixing up subgroup order

Subgroups and moving ranges only work in the order parts were made. Sorting by value or merging shifts breaks the range estimate and hides real changes.

Fix: keep a time stamp or sequence number with every value.

Too little data

A handful of subgroups gives a shaky sigma, and Cpk can move a lot from one study to the next.

Fix: aim for about 25 subgroups or 100 values.

Ignoring an unstable chart

If the X-bar and R chart shows out-of-control points, the process has no single capability to report. Any Cpk you calculate describes a moving target.

Fix: find and remove special causes, then collect fresh data.

Assuming the data is normal

The formula and the ppm estimate both assume a roughly normal distribution. Skewed characteristics can make Cpk look better or worse than reality.

Fix: check a histogram before you trust the number.

Getting Cpk without the hand math

Knowing how to calculate Cpk by hand is worth it once, so you can spot a wrong answer later. After that, the arithmetic is the least useful part of your day. If your data already lives in a spreadsheet, you can do the same steps in Excel. Or paste it into the Cp/Cpk Report Generator, which handles the steps above and gives an estimate you can check.

Paste your wayIndividuals or subgroups of 2 to 10
Sigma done for youFrom R-bar/d2 or the moving range
Stability checkX-bar and R chart with signals flagged
Share itOne-page PDF report
Paste your data, get your Cpk

Get Cp, Cpk, Pp and Ppk from your own data: paste your measurements and get a one-page capability report. 14-day free trial, no card needed.

X-bar chart preview



UCLCenter lineLCL

Frequently asked questions

What sigma should I use to calculate Cpk?

Use the within-subgroup, or short-term, sigma. For subgroups, that is R-bar divided by the d2 constant for your subgroup size. For individual values, it is the average moving range divided by 1.128. Do not use the standard deviation of all the data, because that gives Ppk instead of Cpk.

What is the d2 constant?

The d2 constant converts the average subgroup range into an estimate of sigma. It depends only on subgroup size: 1.128 for subgroups of 2, 2.326 for subgroups of 5 and 3.078 for subgroups of 10. Divide R-bar by the d2 value that matches your subgroup size to get the within sigma.

Can I calculate Cpk from individual measurements?

Yes. Keep the values in production order, calculate the moving range between each pair of consecutive values, and average those ranges to get MR-bar. Sigma is MR-bar divided by 1.128. Then apply the same Cpu and Cpl formulas and take the smaller one as Cpk. Check an individuals chart for stability first.

Is the Cp Cpk formula the same for subgroups and individuals?

Yes. The formulas do not change: Cp is the tolerance divided by six sigma, and Cpk is the smaller of the two distances from the mean to a limit, divided by three sigma. Only the sigma estimate changes, using R-bar / d2 for subgroups and MR-bar / 1.128 for individuals.

Why does my Cpk come out lower than my Cp?

Because the mean is not at the center of the tolerance. Cpk measures room to the nearest limit, so any offset lowers it while Cp stays the same. In the worked example, Cp is 1.29 but Cpk is 0.98, since the mean sits 0.012 mm high. Re-centering at nominal would bring Cpk back to about 1.29.


Share This Story, Choose Your Platform!