Pharmaceutical Calculation Suite
Monitor process location and spread from rational subgroups — X̄-R for small subgroups, X̄-S for larger ones, with Western Electric rules 1–5 flagged point by point.
X̄-R and X̄-S charts monitor a process sampled in rational subgroups — typically 3–5 items taken together at regular intervals: 5 tablets from a press every hour, 3 fill-weight checks per run. The X̄ chart tracks process location; the companion R (range) or S (standard deviation) chart tracks within-subgroup spread. Because control limits are built from within-subgroup variation only, the charts respond quickly to special causes between subgroups.
R or S? The range chart is the classical hand-calculation choice and works well for small subgroups (n ≤ 8 or so); the S chart uses every observation and is preferred for larger subgroups or software-computed charts. This calculator supports both and picks constants for any n from 2 to 25.
Typical applications: tablet compression monitoring, fill-weight sampling, dissolution with multiple units per timepoint, and CPV Stage 3 continued process verification.
Constants for n = 5: A₂ = 0.577, D₃ = 0, D₄ = 2.114, A₃ = 1.427, B₃ = 0, B₄ = 2.089, d₂ = 2.326, c₄ = 0.9400. The calculator holds the full n = 2–25 table (standard SPC constants as tabulated in the ASQ CSSBB Handbook, Appendices 4 and 6; published tables differ occasionally in the last printed digit).
Western Electric rules flagged by this calculator (applied to both charts): 1 — a point beyond ±3σ; 2 — 9 consecutive points on one side of the centerline; 3 — 6 consecutive points steadily increasing or decreasing; 4 — 2 of 3 consecutive points beyond ±2σ on the same side; 5 — 4 of 5 consecutive points beyond ±1σ on the same side. Each rule can be switched on or off to match your SOP. Naming note: Rule 2's 9-point run criterion follows Nelson (1984) — the default in most SPC software; the original Western Electric Handbook (1956) rule is 8 consecutive points, which is what PharmaCalc's I-MR calculator applies. The rule numbering also differs between the two calculators (here Rules 2–3 are the run/trend tests and 4–5 the zone tests; on I-MR, Rules 2–3 are the zone tests). Map your SOP to the rule definitions, not the rule numbers.
| Symbol | Name | Units | Description |
|---|---|---|---|
| xᵢⱼ | Individual measurement | product units | Measurement j within subgroup i. |
| X̄ᵢ, X̿ | Subgroup mean, grand mean | product units | X̿ (average of subgroup means) is the X̄-chart centerline. |
| Rᵢ, R̄ | Subgroup range, average range | product units | R̄ is the R-chart centerline and drives X̄-R limits. |
| sᵢ, S̄ | Subgroup SD, average SD | product units | S̄ is the S-chart centerline and drives X̄-S limits. |
| A₂, D₃, D₄ | R-chart constants | — | Functions of n; convert R̄ into control limits. |
| A₃, B₃, B₄ | S-chart constants | — | Functions of n; convert S̄ into control limits. |
| d₂, c₄ | σ-estimate constants | — | σ̂ = R̄/d₂ or S̄/c₄ — the short-term σ used for capability. |
| n, k | Subgroup size, subgroup count | count | n items per subgroup; k subgroups. Collect ≥ 20–25 subgroups before fixing limits. |
Scenario: Tablet compression monitoring, subgroup size n = 5, five subgroups of fill weights (mg). (Five subgroups keeps the arithmetic followable — production charts should have ≥ 20–25 subgroups before limits are fixed; until then treat limits as trial limits.)
PharmaCalc returns the right chart for your subgroup size, with every rule violation flagged. It is computed server-side against the published method and written into a GMP PDF report with the inputs, formula chain, references, document control and signature pages — traceable to the software release that produced it.
Open the X̄-R / X̄-S Chart calculator — free demo