X̄-S Chart Calculator — Subgroup Averages and Standard Deviations
Paste subgrouped measurements and get the X̄ and s charts, with σ̂ = s̄/c₄ and the A₃, B₃ and B₄ factors derived from the exact c₄ — so subgroups of 12, 30 or 60 get real constants instead of a table that stops at 25.
When to use the standard deviation instead of the range
The range uses two observations and discards the rest. That barely matters at n = 2, where the range *is* the spread; it matters more with every observation you add. NIST prints the relative efficiency of R against s/c₄ as 1.000 at n = 2, 0.955 at n = 5 and 0.850 at n = 10, and recommends standard deviations above about ten.
So: subgroups of nine or more, use this chart. Automated inspection that measures every part, use this chart. Anywhere the subgroup size varies, use this chart — s handles unequal subgroups gracefully and the range does not.
Below about eight the two charts tell the same story, and the X̄-R chart is easier to hand-check on the shop floor. That is a real advantage and the reason it has not gone away.
Data
Paste straight from Excel, Minitab or a CMM export — include the header row and the columns are matched by name, in any order.
| # | Subgroup | Measurement | |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 |
0 rows of data
Loading the calculation engine…
Enter data on the left to chart it
SVG is vector — it stays sharp at any size in a report. PNG 4× is roughly 600 dpi at figure width. Every export carries the estimator, the constants and the rule set drawn inside the figure, so the file is readable on its own.
Downloads carry a small “made with spcplot.com” credit along the bottom edge. The chart on screen is never watermarked, and the credit is a credit rather than a licence restriction — the figures are yours to publish either way. A Pro or Lifetime licence removes it.
Options
This plot has no adjustable options yet.
Your measurements are processed entirely in this browser tab. Nothing you type here is uploaded, so confidential production data stays confidential.
The X̄-S chart formulas, and where c₄ comes from
Centre lines x̄̄ and s̄. Averages limits x̄̄ ± A₃s̄, equivalently x̄̄ ± 3s̄/(c₄√n). Standard-deviation limits B₃s̄ and B₄s̄, equivalently s̄ ∓ 3(s̄/c₄)√(1−c₄²).
All four factors come from one constant. c₄ = √(2/(n−1))·Γ(n/2)/Γ((n−1)/2) is the expected value of the sample standard deviation of n standard normal observations — the sample s is a *biased* estimator of σ, and c₄ is exactly how biased. A₃ = 3/(c₄√n), and B₃, B₄ = 1 ∓ 3√(1−c₄²)/c₄, follow algebraically.
c₄ is exact in closed form, so this is the one corner of SPC where computing rather than tabling is not a trade-off but strictly better — and it is why the constants here run to n = 100 while the published tables stop at 25. Using the n = 25 row for a subgroup of 40 is the usual workaround, and it is simply wrong.
What the s chart catches that the X̄ chart cannot
A process can go out of control without its mean moving at all. One filling needle clogs, one cavity runs cold, one operator measures differently: the spread widens, the average lands on target, and the panel most people read first shows nothing. The dataset loaded on this page is exactly that case — twenty trays of ten vials, one tray with a partially blocked needle, no signal on the averages chart and an unmistakable one below it.
It is also why the s chart is read first. If the within-subgroup spread is unstable then σ̂ — the yardstick the averages limits are built from — is an average of two different processes, and the X̄ limits are not measuring what they claim to.
Unequal subgroups, and reading the disclosure
When subgroup sizes vary, both panels get limits recomputed at each subgroup’s own n, and the s chart’s centre line moves with them: the expected standard deviation of a sample of n is c₄(n)·σ, which is smaller for smaller subgroups. The result is a staircase rather than a straight line, and that is the correct picture. A flat limit from the average n is available for reproducing somebody else’s chart, labelled as the approximation it is.
Under the panels, with no option to switch it off: the estimator behind σ̂, the factors used and whether they were computed or rounded to a published table, the subgrouping, the active rule set, any frozen baseline, and every warning. If a limit moved because a switch was flicked, the figure says which switch.
Common questions
- What are the X̄-S chart formulas?
- Averages: x̄̄ ± A₃s̄, where A₃ = 3/(c₄√n). Standard deviations: centre s̄, limits B₃s̄ and B₄s̄, where B₃ = max(0, 1 − 3√(1−c₄²)/c₄) and B₄ = 1 + 3√(1−c₄²)/c₄. Every one of them is a function of c₄ alone, and c₄ = √(2/(n−1))·Γ(n/2)/Γ((n−1)/2).
- What is c₄ and why divide by it?
- The sample standard deviation systematically underestimates σ, and c₄ is the factor by which: E[s] = c₄σ. At n = 5 that is 0.9400, so s̄ runs about six per cent low and σ̂ = s̄/c₄ corrects it. The correction shrinks as the subgroup grows — 0.9727 at n = 10, 0.9896 at n = 25 — but it never disappears, and leaving it out makes every limit about as much too narrow.
- Why is there no lower limit on my s chart?
- B₃ is zero for every subgroup size below six, for the same reason D₃ is zero below seven: 1 − 3√(1−c₄²)/c₄ is negative there, and a standard deviation cannot be. From n = 6 upward there is a real lower limit, and a point below it is worth investigating rather than celebrating — it usually means the measurement stopped resolving, not that the process improved.
- X̄-S or X̄-R — does the choice change my control limits?
- Yes, slightly, and on purpose. R̄/d₂ and s̄/c₄ are two estimators of the same σ and they do not agree on real data. Both are offered on both pages, the figure prints which one produced the limits, and if you are comparing against an existing chart you can switch to whichever the other tool used. Do not let one chart’s σ̂ silently feed a capability calculation elsewhere: which estimator produced it is part of the number.
- Can I use subgroup sizes above 25?
- Yes, and it is one of the reasons to prefer this chart. The constants are computed from the normal distribution up to n = 100, so nothing about the arithmetic changes. What changes is that no published table covers those rows, so they cannot be cross-checked against a printed source — and the figure says so.
- Is my data uploaded anywhere?
- No. The whole calculation runs as JavaScript in this browser tab, and nothing on this site accepts a measurement — the only server code here takes a payment. That is why the tool is usable on data you are contractually barred from putting in a cloud service.