How the control limits are calculated
A Shewhart chart puts its limits three standard deviations of the plotted statistic (three standard errors) either side of the center line. The standard deviation is estimated from variation within subgroups, so that shifts between subgroups show up as signals instead of widening the limits. From \(k\) subgroups of size \(n\), the tool takes the grand mean \(\bar{\bar x}\) (the mean of the subgroup means), the average range \(\bar R\) (the mean of the subgroup ranges, largest minus smallest value), and the average standard deviation \(\bar s\) (the mean of the subgroup standard deviations, each with the \(n-1\) divisor). From \(N\) individual values it takes their mean \(\bar x\) and the average \(\overline{MR}\) of the \(N-1\) moving ranges \(|x_i - x_{i-1}|\). The limits are:
The constants come from the distribution of the range and the standard deviation of \(n\) independent normal values. The mean range is \(d_2\sigma\), with \(d_2 = \int_{-\infty}^{\infty} \bigl[1 - \Phi(x)^n - \bigl(1-\Phi(x)\bigr)^n\bigr]\,dx\) for the standard normal distribution function \(\Phi\); the standard deviation of the range is \(d_3\sigma\); and the mean of \(s\) is \(c_4\sigma\), with \(c_4 = \sqrt{2/(n-1)}\,\Gamma(n/2)/\Gamma\bigl((n-1)/2\bigr)\). So \(\hat\sigma = \bar R/d_2 = \bar s/c_4\), \(A_2 = 3/(d_2\sqrt n)\), \(A_3 = 3/(c_4\sqrt n)\), \(D_3, D_4 = 1 \mp 3d_3/d_2\), and \(B_3, B_4 = 1 \mp 3\sqrt{1-c_4^2}/c_4\), with negative values set to zero. With a standard given (Phase II), the X̄ limits are \(\mu_0 \pm 3\sigma_0/\sqrt n\), the range chart runs from \(D_1\sigma_0\) to \(D_2\sigma_0\) around \(d_2\sigma_0\), with \(D_1, D_2 = d_2 \mp 3d_3\), and the S chart runs from \(B_5\sigma_0\) to \(B_6\sigma_0\) around \(c_4\sigma_0\), with \(B_5, B_6 = c_4 \mp 3\sqrt{1-c_4^2}\). A moving range is the range of two values, so the individuals chart uses the \(n = 2\) factors: \(3/d_2 = 3/1.128 = 2.660\), \(D_4 = 3.267\), and, with a standard given, limits \(\mu_0 \pm 3\sigma_0\) and \(D_2\sigma_0 = 3.686\,\sigma_0\).
Factors for common subgroup sizes, for limits estimated from the data (Phase I):
| n | A₂ | D₃ | D₄ | d₂ | A₃ | B₃ | B₄ | c₄ |
|---|---|---|---|---|---|---|---|---|
| 2 | 1.880 | 0 | 3.267 | 1.128 | 2.659 | 0 | 3.267 | 0.7979 |
| 3 | 1.023 | 0 | 2.574 | 1.693 | 1.954 | 0 | 2.568 | 0.8862 |
| 4 | 0.729 | 0 | 2.282 | 2.059 | 1.628 | 0 | 2.266 | 0.9213 |
| 5 | 0.577 | 0 | 2.114 | 2.326 | 1.427 | 0 | 2.089 | 0.9400 |
| 6 | 0.483 | 0 | 2.004 | 2.534 | 1.287 | 0.030 | 1.970 | 0.9515 |
| 8 | 0.373 | 0.136 | 1.864 | 2.847 | 1.099 | 0.185 | 1.815 | 0.9650 |
| 10 | 0.308 | 0.223 | 1.777 | 3.078 | 0.975 | 0.284 | 1.716 | 0.9727 |
And for a standard given (Phase II), with d₃:
| n | d₃ | D₁ | D₂ | B₅ | B₆ |
|---|---|---|---|---|---|
| 2 | 0.853 | 0 | 3.686 | 0 | 2.606 |
| 3 | 0.888 | 0 | 4.358 | 0 | 2.276 |
| 4 | 0.880 | 0 | 4.698 | 0 | 2.088 |
| 5 | 0.864 | 0 | 4.918 | 0 | 1.964 |
| 6 | 0.848 | 0 | 5.079 | 0.029 | 1.874 |
| 8 | 0.820 | 0.388 | 5.307 | 0.179 | 1.751 |
| 10 | 0.797 | 0.686 | 5.469 | 0.276 | 1.669 |
The calculator holds the factors for n = 2–25. A₂, A₃, B₃, B₄, D₃, D₄, d₂, d₃, and c₄ are the published values (Montgomery, Appendix VI). Computed from the integrals above, every one agrees to within 0.001, but eight differ in the last digit, because the classic tables were partly computed from rounded values: D₄ for n = 3, for example, is printed as 2.574 against an exact 2.5746, and the NIST handbook prints 2.575. D₁, D₂, B₅, and B₆ are computed from the integrals and shown to three decimals.
The average moving range is the standard estimate of σ for individual values. When a few very large moving ranges inflate it, the median moving range \(\widetilde{MR}\) is a more robust alternative, with limits \(\bar x \pm 3.145\,\widetilde{MR}\). Do not use the standard deviation of all the values: any shift or drift in the data inflates it and widens the limits, which hides the very signals the chart looks for (Wheeler, “Individual charts done right and wrong”).
Run rules
Points beyond the control limits are not the only sign of a special cause. The zone rules of the Western Electric handbook catch smaller sustained shifts sooner. They divide each side of the center line into zones at 1σ and 2σ, where σ is the standard deviation of one plotted point (σ/√n for subgroup means). The tool checks these rules:
Rule 1: one point beyond a 3σ control limit.
Rule 2: two of three consecutive points beyond 2σ on the same side. The third point can be anywhere.
Rule 3: four of five consecutive points beyond 1σ on the same side.
Rule 4: eight consecutive points on the same side of the center line.
Trend: six consecutive points, each higher than the one before (or each lower).
These are the Western Electric (1956) versions of rules 1–4, which count the points on each side of the center line separately, plus the six-point trend test from Nelson’s (1984) list of eight tests. A point beyond 3σ also counts as beyond 2σ and beyond 1σ, and a point exactly on the center line breaks a run. Nelson’s run test uses nine points in a row rather than eight, which raises the in-control ARL with rule 1 from 153 to 217 points. His list also flags 14 points in a row alternating up and down, 15 in a row within 1σ (stratification), and 8 in a row beyond 1σ on either side (a mixture), which the tool does not check.
The tool applies the selected rules to the X̄ or individuals chart, and only rule 1 to the range, S, and moving-range charts. Ranges and standard deviations of small subgroups have skewed distributions that the symmetric zones do not fit, and consecutive moving ranges share a value, so they are not independent: Wheeler and Stauffer advise against rules 2–4 on a moving-range chart.
False alarms and how fast a shift is caught
Every rule added makes the chart react sooner to a small shift, and more likely to signal when nothing has changed. The average run length (ARL), the average number of points plotted before the first signal, measures both. For normal data and known limits, the ARL of a stable process and after a step shift of the mean by 0.5σ, 1σ, or 2σ:
| Rules | Stable | 0.5σ | 1σ | 2σ |
|---|---|---|---|---|
| 1 only | 370 | 155 | 43.9 | 6.30 |
| 1 and 4 | 153 | 44.3 | 14.6 | 4.89 |
| 1–4 | 91.8 | 27.3 | 9.22 | 3.13 |
| 1–4 and trend | 77.5 | 26.3 | 9.18 | 3.13 |
The shifts are in σ of one plotted point: on an X̄ chart of subgroups of 5, a 1σ shift is a change of 0.45 process σ. The first three rows are exact, by the Markov-chain method of Champ and Woodall (1987), who give 91.75 for rules 1–4; the trend row is simulated, to within ±0.1.
The range, S, and moving-range charts add false alarms of their own, because these statistics have long upper tails: with known σ, a point crosses the UCL about once every 220 subgroups on an R chart with n = 5, and once every 110 points on a moving-range chart. In Phase I, where the limits come from the same data, what matters is the chance of at least one false signal in the whole data set. With every rule on, a perfectly stable set of 25 subgroups of 5 shows at least one signal about one time in four (27 % in a simulation that runs stable normal data through this tool), and a stable 100-point individuals series usually does (83 %). Investigate signals; do not adjust the process for every one.
The trend rule earns its place least. Davis and Woodall (1988) found that it is of virtually no help in detecting a drift of the mean once the other run rules are in use, and Wheeler and Stauffer (2017) advise against it. In the table it adds about 18 % more false alarms for no real gain, and for a drift of 0.1σ per point it shortens the ARL only from 12.1 to 12.0 points. Clear its box unless a trend is the failure you are watching for.
Worked example
The default data are 25 subgroups of 5 ablation-depth measurements. The grand mean is 12.138 µm and \(\bar R = 0.7032\) µm, so the X̄ limits are \(12.138 \pm 0.577 \times 0.7032 = 11.732\) to \(12.544\) µm. The R-chart UCL is \(2.114 \times 0.7032 = 1.487\) µm, and the within-subgroup σ is \(0.7032/2.326 = 0.302\) µm.
No point crosses a control limit, but the zone rules catch four low means out of five (subgroups 8–12, rule 3). Late in the run they catch the upward shift: rule 2 at subgroup 24, rule 3 at 24, and rule 4 at 25. The realized shift was about 0.3 µm, roughly 1 process σ. Because the Phase I grand mean includes the shifted subgroups, those subgroups sit only about 1.5σ of X̄ above the center line, and rule 1 alone would have missed the shift. In Phase I, find the cause, remove the affected subgroups, and recalculate the limits before using them for monitoring.
The button under the rule violations table leaves the flagged subgroups out without editing the data. Here it is not enough on its own. Each rule flags only the point that completes its pattern, so leaving out subgroups 12, 24, and 25 gives a chart with no signals whose grand mean, 12.129 µm, still includes the shifted subgroups 18 to 23. The cause decides what to remove, not the flags. If the investigation shows that the shift began at subgroup 18, type 18-25 in the leave-out field: the 17 subgroups that remain give a grand mean of 12.045 µm, \(\bar R = 0.6788\) µm, and X̄ limits of 11.653 to 12.437 µm, with no signals.
With a standard given instead (Phase II, μ₀ = 12.0 µm and σ₀ = 0.30 µm), the X̄ limits are \(12.0 \pm 3 \times 0.30/\sqrt 5\), 11.598 to 12.402 µm, and the shift is unmistakable: rule 1 flags subgroups 20, 23, and 24, and the zone rules flag every subgroup from 20 to 25. The R chart runs from 0 to \(D_2\sigma_0 = 4.918 \times 0.30 = 1.475\) µm around \(d_2\sigma_0 = 0.698\) µm.
Assumptions and limits
- Rational subgroups. Measurements within a subgroup should be made close together under the same conditions, so within-subgroup variation reflects only common causes. Mixing machines, heads, or material lots within a subgroup inflates R̄, widens the limits, and hides real shifts.
- Equal subgroup sizes. Every subgroup must hold n values. The tool ignores an incomplete last subgroup; data with subgroups of different sizes need limits that change from subgroup to subgroup, which the tool does not compute.
- Independence. Strongly autocorrelated data, such as slow thermal drift or high-rate sensor streams, produce too many false alarms. Subsample the data, or chart the residuals of a time-series model (Montgomery, Section 10.4).
- Approximate normality. X̄ charts are robust to non-normal data because subgroup means are close to normal. An individuals chart of skewed data gives more false alarms on the long-tail side: for a chi-square distribution with 4 degrees of freedom, 1.4 % of points fall above the upper 3σ limit, an ARL of about 71 instead of 370. Wheeler found that 3σ limits still cover more than 98 % of every mound-shaped distribution he examined, so the chart still works, but check a histogram before reading much into points just beyond the limit on the long tail.
- Enough data. Limits from fewer than about 20–25 subgroups (or 50–100 individual values) are uncertain: treat them as trial limits and revise them as data accumulate. Even 25 subgroups of 5 leave the limits uncertain. In a simulation with rule 1 only, one Phase I study in ten gives limits with an in-control ARL below 130 points and one in ten above 850, against the nominal 370; with 100 subgroups the range narrows to about 220–570, and for 100 individual values it is about 120–1200. Jensen et al. review this effect of estimating the limits.
- Control limits are not specification limits. Control limits describe the process; specification limits describe the customer requirement. Use the capability calculator to compare the two.
References
Primary sources and standards
- ISO 7870-2:2023, Control charts — Part 2: Shewhart control charts, 2nd ed., replacing ISO 7870-2:2013 (the international standard guide to Shewhart charts, which also introduces warning limits and the analysis of patterns; general guidelines are in ISO 7870-1:2019).
- D. C. Montgomery, Introduction to Statistical Quality Control, 8th ed., Wiley (2020): Section 5.3 (Phase I and Phase II; the Western Electric and other sensitizing rules, p. 192), Chapter 6 (X̄–R, X̄–S, and individuals charts), Section 10.4 (autocorrelated data), and Appendix VI (factors for constructing variables control charts).
- Western Electric Co., Statistical Quality Control Handbook, 1st ed. (1956) (the zone tests, rules 1–4).
- L. S. Nelson, “The Shewhart control chart—tests for special causes,” J. Qual. Technol. 16(4), 237–239 (1984), doi:10.1080/00224065.1984.11978921 (the eight tests, including the six-point trend test and the nine-point run).
- C. W. Champ and W. H. Woodall, “Exact results for Shewhart control charts with supplementary runs rules,” Technometrics 29(4), 393–399 (1987), doi:10.1080/00401706.1987.10488266 (the Markov-chain method for run-rule ARLs, and 91.75 for rules 1–4).
- R. B. Davis and W. H. Woodall, “Performance of the control chart trend rule under linear shift,” J. Qual. Technol. 20(4), 260–262 (1988), doi:10.1080/00224065.1988.11979118 (the trend rule adds little once the zone rules are in use).
- W. A. Jensen, L. A. Jones-Farmer, C. W. Champ, and W. H. Woodall, “Effects of parameter estimation on control chart properties: A literature review,” J. Qual. Technol. 38(4), 349–364 (2006), doi:10.1080/00224065.2006.11918623 (how limits estimated in Phase I change the chart’s false-alarm rate).
- D. J. Wheeler and D. S. Chambers, Understanding Statistical Process Control, 3rd ed., SPC Press (2010) (XmR charts and the detection rules).
- D. J. Wheeler and R. Stauffer, “When should we use extra detection rules?” Quality Digest (October 2017), spcpress.com (what each zone rule adds; no zone rules on the moving-range chart; against the trend rule).
- D. J. Wheeler, “Individual charts done right and wrong,” Quality Digest Daily (2 February 2010), spcpress.com (limits from the average or the median moving range, never the global standard deviation).
- D. J. Wheeler, “Are you sure we don’t need normally distributed data?” Quality Digest Daily (1 November 2010), spcpress.com (how much of a non-normal distribution 3σ limits cover; ARL 70.9 for a chi-square distribution with 4 degrees of freedom).
- AIAG, Statistical Process Control (SPC) Reference Manual, 2nd ed. (2005); AIAG and VDA QMC published a joint AIAG & VDA SPC Manual, 1st ed., in 2026 (automotive-industry practice).
Textbooks
- G. E. P. Box, J. S. Hunter, and W. G. Hunter, Statistics for Experimenters: Design, Innovation, and Discovery, 2nd ed., Wiley-Interscience (2005), Section 14.1, pp. 565–568 (the Shewhart chart with 3σ action and 2σ warning lines on subgroup averages, σx̄ = σ/√n, and the four Western Electric rules).
- J. Mandel, The Statistical Analysis of Experimental Data, Interscience Publishers (1964), Section 5.2, pp. 80–85, and Section 6.6, Table 6.3, pp. 110–111 (rational subgroups, charts for averages and ranges, and within- versus between-subgroup variability; the d2 table and σ̂ = R̄/d2 behind A2, D4, and the I–MR constants).
- D. Freedman, R. Pisani, and R. Purves, Statistics, 4th ed., W. W. Norton (2007), Chapter 5, Section 1, p. 79, and the Normal Table, p. A-104 (the 68–95–99.7 rule, and 99.73 % within ±3σ, behind the 0.27 % false-alarm rate and the in-control ARL of 370).
Free introductions
- NIST/SEMATECH, “What are variables control charts?,” e-Handbook of Statistical Methods, Section 6.3.2 (the Western Electric rules, and a false alarm every 371 points on average without them against 91.75 with them).
- NIST/SEMATECH, “Shewhart X-bar and R and S control charts” and “Individuals control charts,” e-Handbook of Statistical Methods, Sections 6.3.2.1–6.3.2.2 (how the limits are computed, with a worked example).
- D. J. Wheeler, “Contra two sigma,” Quality Digest Daily (1 May 2013), spcpress.com (why control charts use 3σ limits rather than 2σ, and the Western Electric rules as the better way to add sensitivity).