Process capability tells you whether your manufacturing process can consistently produce units within specification limits. Cp measures the potential, Cpk measures the reality. Together they reveal whether your process is capable and centered.
The Formulas
Cp measures how much of the specification window your process variation uses:
Cp = (USL - LSL) / 6σ
Where USL is the upper specification limit, LSL is the lower specification limit, and σ is the process standard deviation.
Cp only looks at spread. It ignores whether your process is centered between the limits. That's where Cpk comes in.
Cpk = min((USL - μ) / 3σ, (μ - LSL) / 3σ)
Where μ is the process mean. Cpk takes the worse side. If your process drifts toward one limit, Cpk drops even if Cp stays high.
What Cpk Values Mean
| Cpk Value | Interpretation | Defect Rate (approx.) |
|---|---|---|
| < 1.0 | Process is not capable. Units are falling outside limits. | > 2,700 ppm |
| 1.0 | Barely capable. The 3-sigma edge touches the spec limit. | ~2,700 ppm |
| 1.0 - 1.33 | Marginally capable. Acceptable for non-critical dimensions. | 2,700 - 63 ppm |
| 1.33 | Commonly accepted minimum for production processes. | ~63 ppm |
| 1.33 - 1.67 | Good capability. Reasonable margin for process drift. | 63 - 0.6 ppm |
| > 1.67 | Excellent. Process has significant margin within spec. | < 0.6 ppm |
A practical way to think about it: Cpk 1.33 means your process uses 75% of the specification window, leaving 25% as buffer for drift and variation. Most automotive and aerospace standards require Cpk >= 1.33 for production, with 1.67 for safety-critical parameters.
The Relationship Between Cp and Cpk
When Cp equals Cpk, your process is perfectly centered between the specification limits. When Cpk is significantly lower than Cp, your process has drifted off-center.
| Scenario | Cp | Cpk | Diagnosis |
|---|---|---|---|
| Centered and capable | 1.5 | 1.5 | Ideal state |
| Off-center but capable spread | 1.5 | 0.9 | Process mean has drifted. Re-center it. |
| Wide variation, centered | 0.8 | 0.8 | Too much variation. Reduce σ. |
| Wide variation, off-center | 0.8 | 0.4 | Both problems. Fix variation first. |
This distinction matters for corrective action. If Cp is fine but Cpk is low, you need to adjust the process mean (a calibration issue). If Cp itself is low, you need to reduce variation (a fundamental process issue).
Feeding Measurement Data to TofuPilot
For TofuPilot to calculate Cpk, your test code needs to define measurements with upper and lower limits. Here's an OpenHTF test that measures critical parameters on a sensor module:
# Sensor calibration test with limits for Cpk analysis
import openhtf as htf
from openhtf.util import units
from tofupilot.openhtf import TofuPilot
@htf.measures(
htf.Measurement("output_voltage")
.in_range(minimum=2.45, maximum=2.55)
.with_units(units.VOLT),
htf.Measurement("offset_voltage")
.in_range(minimum=-5.0, maximum=5.0),
htf.Measurement("sensitivity")
.in_range(minimum=195, maximum=205),
htf.Measurement("noise_floor")
.in_range(maximum=500),
htf.Measurement("response_time")
.in_range(maximum=10.0),
)
def sensor_validation(test):
test.measurements.output_voltage = 2.501
test.measurements.offset_voltage = 0.8
test.measurements.sensitivity = 200.3
test.measurements.noise_floor = 320
test.measurements.response_time = 4.7
def main():
test = htf.Test(sensor_validation)
with TofuPilot(test):
test.execute(test_start=lambda: "SENSOR-2024-1587")
if __name__ == "__main__":
main()The in_range() calls define USL and LSL. When you set minimum and maximum, TofuPilot gets both limits and can compute Cp and Cpk. When you set only maximum, TofuPilot computes a one-sided capability index.
Reading Cpk in TofuPilot
Once enough test runs accumulate (typically 30+ data points for statistical significance), TofuPilot's measurement analytics show you:
- Cpk value per measurement calculated from your production data. You can see at a glance which measurements are capable and which aren't.
- Measurement histograms overlaid with specification limits, so you can visually assess distribution shape, centering, and spread.
- Control charts that track measurement values over time, revealing drift before it causes Cpk to drop below your threshold.
You don't need to export data and calculate Cpk in a spreadsheet. Define your limits in OpenHTF, run your tests, and TofuPilot computes the rest.
Common Pitfalls
Not enough data. Cpk calculated from 10 units is unreliable. Wait for at least 30 data points, ideally 50+, before making process decisions based on Cpk.
Confusing specification limits with control limits. Specification limits (USL/LSL) come from your product requirements. Control limits come from your process data. Cpk uses specification limits.
Ignoring non-normal distributions. The standard Cpk formula assumes a normal distribution. If your measurement data is skewed (common with one-sided specs like noise floor), the standard formula may overestimate capability.
Mixing populations. If you calculate Cpk across data from two different test stations with different calibrations, the combined σ will be inflated. Check per-station Cpk first.