Skip to main content

Pharma CPV & SPC control chart calculator.

Paste sequential batch yields, titers or assay results to generate a Shewhart I-⁠MR chart, evaluate all 8 Nelson and Western Electric rules, compute Cpk vs Ppk, copy reproducible Python code and export a Stage 3 CPV report in Word or Excel.

Batch data & specification limits

Stage 3 CPV Control Status (30 batches)

Mean (X-bar) & Control Limits
5.038 g/LLCL 4.621 to UCL 5.456 (sigma_w = 0.139)
Process Capability (Cpk / Ppk)
3.503 / 2.304Cp 3.595, Pp 2.364, Overall SD 0.211
Moving Range (MR-bar / UCL)
0.157 / 0.5130 out-of-spec batch(es)
USLLSLUCLMeanLCLLOT-01: 4.82 g/LLOT-02: 4.95 g/LLOT-03: 4.71 g/LLOT-04: 5.04 g/LLOT-05: 4.89 g/LLOT-06: 4.76 g/LLOT-07: 5.12 g/LLOT-08: 4.85 g/LLOT-09: 4.98 g/LLOT-10: 4.79 g/LLOT-11: 5.06 g/LLOT-12: 4.91 g/LLOT-13: 4.83 g/LLOT-14: 5.02 g/LLOT-15: 4.88 g/LLOT-16: 4.94 g/LLOT-17: 4.77 g/LLOT-18: 5.09 g/LLOT-19: 4.86 g/LLOT-20: 4.92 g/LLOT-21: 5.18 g/LLOT-22: 5.26 g/LLOT-23: 5.22 g/LLOT-24: 5.31 g/LLOT-25: 5.28 g/LLOT-26: 5.34 g/LLOT-27: 5.25 g/LLOT-28: 5.39 g/LLOT-29: 5.32 g/LLOT-30: 5.41 g/LLOT-01LOT-30 (red = Nelson / OOS signal)

Nelson & Western Electric Rules (4 triggered)

RuleLevelFlagged BatchesMSAT / QA Interpretation
Rule 2: 9 points on one side of meanACTIONLOT-21, LOT-22, LOT-23, LOT-24, LOT-25, LOT-26 (+4 more)Sustained mean shift (e.g. raw-material lot change, media drift or calibration offset).
Rule 5: 2 of 3 points beyond 2 sigma (same side)ALERTLOT-26, LOT-28, LOT-29, LOT-30Early warning of emerging process shift or increased variance.
Rule 6: 4 of 5 points beyond 1 sigma (same side)ALERTLOT-21, LOT-22, LOT-23, LOT-24, LOT-25, LOT-26 (+4 more)Moderate sustained off-center shift before limits are breached.
Rule 8: 8 points beyond 1 sigma (mixture)ALERTLOT-21, LOT-22, LOT-23, LOT-24, LOT-25, LOT-26 (+4 more)Bimodal mixture of two populations (e.g. two supplier lots or two bioreactor lines).

Reproducible Python (NumPy) snippet for validated notebooks

import numpy as np

# Harvest Titer (2000L Bioreactor) (Stage 3 CPV I-MR + Cpk/Ppk, reproducible script from seal.run)
values = np.array([4.82, 4.95, 4.71, 5.04, 4.89, 4.76, 5.12, 4.85, 4.98, 4.79, 5.06, 4.91, ... # (30 batches total)], dtype=float)
mean = values.mean()
mr = np.abs(np.diff(values))
sigma_within = mr.mean() / 1.128   # d2 for moving range span n=2
sigma_overall = values.std(ddof=1)
ucl, lcl = mean + 3 * sigma_within, mean - 3 * sigma_within
lsl, usl = 3.5, 6.5
cpk = min((usl - mean) / (3 * sigma_within), (mean - lsl) / (3 * sigma_within)) if (lsl is not None and usl is not None) else None
ppk = min((usl - mean) / (3 * sigma_overall), (mean - lsl) / (3 * sigma_overall)) if (lsl is not None and usl is not None) else None
print(f"Mean={mean:.4f}, UCL={ucl:.4f}, LCL={lcl:.4f}, Cpk={cpk}, Ppk={ppk}")

How Stage 3 CPV limits and Nelson rules are calculated.

Within-batch standard deviation is estimated from sequential moving ranges using the standard ASTM E2587 unbiasing constant d₂ = 1.128 for span n = 2. Upper and lower control limits sit at X-bar ± 3 × (MR-bar / 1.128), while all 8 Nelson rules evaluate zone runs, monotonic drift, alternation and stratification across the series.

Frequently asked questions.

Why does FDA Stage 3 CPV use Shewhart I-⁠MR charts with Nelson rules?

FDA’s 2011 Process Validation guidance requires ongoing assurance during routine commercial production that the process remains in a state of statistical control. Individual-⁠Moving Range (I-⁠MR) charts pair with all 8 Nelson rules (which subsume the 4 Western Electric rules) to detect mean shifts, linear drift and variance changes long before a batch fails release specification.

What is the difference between Cpk and Ppk in pharma CPV?

Cpk uses the short-term within-batch standard deviation estimated from average moving range (MR-bar / 1.128), measuring inherent process capability if centered without drift. Ppk uses overall sample standard deviation across all batches. When Ppk falls noticeably below Cpk, a between-batch mean shift or drift is present.

Does this calculator upload my batch data to a server?

No. Every calculation, SVG Shewhart chart, Python snippet, and Word/Excel report runs locally in your browser with zero server transmission.

Cite, embed or query this dataset with AI agents.

Reuse this verified dataset in regulatory briefings, consultant reports, LinkedIn posts or AI workflows. All tables are also published as open CC0 CSV & JSON files at github.com/opvia/fda-gxp-datasets.

Source: [Pharma CPV & SPC Control Chart Calculator (Nelson Rules) (Seal)](https://seal.run/tools/cpv-control-chart-calculator) | Free browser-local Shewhart I-MR CPV control chart calculator with all 8 Nelson & Western Electric rules, Cpk/Ppk, Python code and Word/Excel Stage 3 CPV exports.
Free to cite and redistribute with attribution to seal.run.

Sources.

Each was read on 2026-12-04.

Run live Stage 3 CPV trending directly off your electronic batch records and QC LIMS.

Eliminate manual Excel transcription across APQR and CPV cycles. Query validated GMP batch tables via Python, SQL and REST API with AI Neil flagging cohort shifts automatically.