X-Bar S Chart Template
Get the X-bar S chart template
An Excel workbook that turns subgroups of up to 25 readings into a paired X-bar chart and S chart, with the control limits calculated live from the A3, B3 and B4 constants.
Download XLSXAn x bar s chart (also written X-bar S or Xbar-S) is a pair of control charts for continuous data collected in subgroups of roughly ten readings or more. The X-bar chart tracks each subgroup's average and the S chart tracks each subgroup's standard deviation, so the two charts watch where a process is centered and how much it varies, sample by sample, against control limits taken from the process's own data.
This page covers the x bar s chart formulas, the constants table for subgroup sizes 2 to 25, how to fill the template in, and a worked case: 20 hourly subgroups of 12 coffee bags from a contract packer, one of which lands outside the limits.
It's for quality engineers, supplier quality managers and procurement analysts who get a vendor's measurement data and need charts that say if the process behind it is stable before a contract renewal or a first purchase order.
Download the free X-bar S chart template
Download the X-bar S chart template (XLSX)Four tabs and two live charts: instructions, a data entry sheet with live subgroup averages, standard deviations and control limits, the paired X-bar and S charts, and a constants table for subgroup sizes 2 to 25, pre-filled with the Halvard Roasting worked case.
The file opens in Excel, Google Sheets and LibreOffice Calc, and Google Sheets redraws the same charts on import. Every calculation uses AVERAGE, STDEV.S, AVERAGEIF and INDEX/MATCH, and both charts are native line charts that redraw when you paste in new values.
What an x bar s chart is
The x bar s chart is a statistical process control tool built from two control charts on one time axis. Each subgroup of readings is reduced to two numbers: its mean, plotted on the x bar chart, and its sample standard deviation, plotted on the S chart. JMP describes the pair the same way: subgroup averages on top, within-subgroup standard deviations below.
Each control chart carries a center line and two control limits three standard errors either side of it. A point outside the limits is a sign of special-cause variation, something assignable that changed. Points inside the limits reflect common-cause variation, the background noise every process carries. A slow drift that stays under the radar of a pass/fail inspection log shows up on the plot within a few subgroups.
Control limits describe how the process behaves. Specification limits describe what the customer will accept. A process can sit in statistical control and still ship bags under the label weight, so the charts answer "is it stable?" and a capability study answers "is it good enough?"
When to use X-bar S over X-bar R
The X-bar R control chart and the X-bar S control chart share the same top chart. They differ in how they measure the spread: the R chart uses the range, the largest reading minus the smallest, and the S chart uses every reading in the subgroup. That's why the S chart gives a more accurate estimate of variation once subgroups get large, at the cost of a calculation that's slow to do manually.
Range charts throw away every reading except the two extremes, which costs little at 4 readings and a lot at 15.
Sources set the subgroup size cut-off at different points. Minitab says "the subgroup size should be 9 or more observations" and wants at least 60 observations in total. Wikipedia's X-bar and s chart entry puts it above 10. Lean Tech, a Norwegian training site, starts at 6.
| Readings per subgroup | Control chart to use | Spread measure |
|---|---|---|
| 1 | Individuals and moving range | Moving range of consecutive points |
| 2 to 8 | X-bar R chart | Range per subgroup |
| 9 or more, or a subgroup size that varies | X-bar S chart | Standard deviation per subgroup |
The S chart also copes with unequal subgroups, which Wikipedia lists as its second use case. If one hour yields 12 bags and the next yields 10, the standard deviation still means the same thing.
X-bar S chart formulas
With k subgroups of n readings each, every line on both charts comes from two averages and three constants, per the same Wikipedia entry:
| Line | X-bar chart | S chart |
|---|---|---|
| Plotted point | Subgroup average x̄ | Subgroup standard deviation s, with n - 1 in the denominator |
| Center line | X̄̄, the grand average of the subgroup averages | s̄, the average of the subgroup standard deviations |
| Upper control limit | X̄̄ + A3 × s̄ | B4 × s̄ |
| Lower control limit | X̄̄ - A3 × s̄ | B3 × s̄ |
The constants exist because s runs low: for normal data, s estimates c4 times sigma, per NIST's Engineering Statistics Handbook. Dividing s̄ by c4 gives the process standard deviation estimate that feeds Cp and Cpk. NIST lists c4 = 0.9727 for n = 10, and that's the value the template's table uses.
Control chart constants for subgroup sizes 2 to 25
A3 = 3 / (c4 × √n), and B3 and B4 equal 1 ∓ 3√(1 - c4²) / c4, with B3 floored at zero. The values below are computed from NIST's c4 formula, rounded to three decimals:
| n | A3 | B3 | B4 | c4 |
|---|---|---|---|---|
| 5 | 1.427 | 0 | 2.089 | 0.9400 |
| 6 | 1.287 | 0.030 | 1.970 | 0.9515 |
| 8 | 1.099 | 0.185 | 1.815 | 0.9650 |
| 9 | 1.032 | 0.239 | 1.761 | 0.9693 |
| 10 | 0.975 | 0.284 | 1.716 | 0.9727 |
| 12 | 0.886 | 0.354 | 1.646 | 0.9776 |
| 15 | 0.789 | 0.428 | 1.572 | 0.9823 |
| 20 | 0.680 | 0.510 | 1.490 | 0.9869 |
| 25 | 0.606 | 0.565 | 1.435 | 0.9896 |
The Constants tab carries every size from 2 to 25. B3 is zero up to n = 5, so S charts for small subgroups get no lower limit.
The four tabs inside the template
| Tab | What it holds |
|---|---|
| Instructions | How to fill each tab, the subgroup size rule and the four Western Electric run rules |
| Data Entry | One row per subgroup: time, up to 25 readings, an Exclude flag, the subgroup average, standard deviation, both sets of limits and an out-of-control flag |
| Charts | The x bar chart and S chart, each with its center line and control limits as flat series |
| Constants | A3, B3, B4 and c4 for subgroup sizes 2 to 25, looked up with INDEX/MATCH |
Type Yes in a row's Exclude cell once its cause is found and fixed, and the limits recalculate from the remaining subgroups without deleting a row of history.
How to make an x bar s chart, step by step
Pick one measure and the subgroup size. Determine the question first: fill weight, seal strength, cycle time. Enter n on the Data Entry tab; 12 is a common choice when an automated device logs every unit.
Collect at least 20 subgroups at regular intervals. Do it by the book: hourly or per batch, in time order. Twenty subgroups of 12 gives 240 readings, four times Minitab's 60-observation minimum.
Paste each subgroup into one row. The sheet runs the calculation for the mean and standard deviation as you go, and both charts redraw with each row.
Review the S chart first. Minitab's can-filling example says "interpret the S chart first", because the X-bar limits are built from s̄. If the spread is unstable, the limits on both charts mean nothing yet.
Then read the X-bar chart for points beyond the limits and for runs, log the issue behind each signal, and flag fixed points with Exclude.
Worked case: 20 hours of coffee-bag weights
Halvard Roasting packs 250 g bags of ground coffee for a retailer's private label. A checkweigher with 0.1 g resolution logs every bag, and the retailer's supplier quality manager pulls 12 consecutive bags each hour for 20 hours. This worked example is the one pre-filled in the download, and both charts in the file plot it.
| Line | Calculation | Value |
|---|---|---|
| Grand average X̄̄ | Average of 20 subgroup averages | 251.185 g |
| Average standard deviation s̄ | Average of 20 subgroup values of s | 1.164 g |
| X-bar limits | 251.185 ± 0.886 × 1.164 | 252.22 g and 250.15 g |
| S chart limits | 1.646 × 1.164 and 0.354 × 1.164 | 1.92 g and 0.41 g |
The S control chart is clean: every subgroup's standard deviation sits between 0.687 g (hour 3) and 1.430 g (hour 16). On the X-bar control chart, hour 14 averages 253.18 g, almost a gram above the upper limit, with a single bag at 256.1 g. The line log showed an auger recalibration at the start of that hour.
With hour 14 marked Exclude, the limits tighten to 252.10 g and 250.06 g around a center of 251.081 g, and s̄ drops to 1.150 g. Divided by c4 = 0.9776, that gives a process standard deviation of 1.18 g, the figure a capability study against the 250 g label would start from. The 1.08 g gap between that center and the label is giveaway, a cost question the variance report template frames for finance.
Hours 4 to 10 also sit below the center line, seven in a row. That's one short of the eight-point rule in the Western Electric rules, so it's a sign worth watching and the devil's in the details of the shift handover that week.
Common mistakes
- Reading the X-bar chart before the S chart, which jumps the gun when the spread itself is unstable.
- Drawing specification limits on the control chart in place of control limits.
- Mixing readings from two filling heads in one subgroup, which inflates s and hides shifts between heads on both charts.
- Recalculating limits after every new point. Freeze them once 20 clean subgroups are in, and review them after a deliberate process change.
- Using the S chart for 4-reading subgroups, where the X-bar R chart does the same job with the range.
A stitch in time saves nine here: a shift caught on hour 14 costs one hour of bags to sort, while the same shift found at a retailer audit can cost a recall. Signals that keep coming back belong in the risk register with an owner.
Excel, Google Sheets or SPC software
A spreadsheet handles one characteristic on one line well, and STDEV.S does the hard part. Dedicated SPC software earns its price when you run a control chart for every characteristic on every line, need automatic Nelson or Western Electric flags, or pull readings straight from a gauge.
For a supplier audit, the spreadsheet is the faster route: paste the vendor's data, check the charts, and attach the file to the vendor evaluation scorecard. If the charts feed a monthly quality pack, the Excel dashboard template has room for them next to the scrap and complaint numbers.
FAQ
What is the formula for x bar?
Add the readings in a subgroup and divide by how many there are. X̄̄ is the average of those subgroup averages, and it's the center line of the x bar chart.
What does x bar stand for?
X-bar is the sample mean, written as an x with a bar over it. On a control chart, each point is the mean of one subgroup.
What does s sub x bar mean?
It's the standard error of the mean: the standard deviation of the subgroup averages, which equals sigma divided by √n. The A3 constant builds that √n into the X-bar limits for you.
What are the 7 rules in a SPC chart?
There's no single list of seven. The Western Electric handbook of 1956 sets four zone rules, and Lloyd Nelson's 1984 set in the Journal of Quality Technology has eight. SPC for Excel treats seven consecutive points on one side of the average as a special-cause pattern, which would flag hours 4 to 10 in the case above.
What is an x, bar, and r chart?
It's the X-bar R chart: the same average chart paired with a range chart. It suits subgroups of 2 to 8 readings and uses the A2, D3 and D4 constants.
What is an x chart?
Shorthand for the X-bar chart, the top half of the pair of charts, which plots subgroup averages over time. With one reading per point, it becomes an individuals chart.
How to calculate SPC control limits?
For an x bar s chart, X̄̄ ± A3 × s̄ on the X-bar chart and B3 × s̄ to B4 × s̄ on the S chart, with the constants read from the subgroup size.
Bottom line
Use this x bar s chart template as your control chart when each subgroup holds nine or more readings, or when the count varies from one subgroup to the next. Read the S chart first, then the X-bar chart, and keep specification limits off both charts.
For subgroups of 2 to 8, switch to the X-bar R version linked in the selection table above. When a point lands outside the limits, the root cause analysis report template is the next file to open.