Statistical Process Control · Worked Guide

X̄–R Chart Explained: Calculations, Control Limits, and a Worked Example

An X̄–R chart uses two views of the same rational subgroups: the R chart tests whether within-subgroup variation is consistent, and the X̄ chart tests whether subgroup averages behave like one stable process.

25 SUBGROUPS × 5 VALUESA2 · D3 · D4 FORMULASACTUAL SPC PRODUCT CHARTSABOUT 17 MINUTES

A specification tells you what product is acceptable. A control chart tells you whether the process behavior has changed. The two questions are related, but they are not interchangeable—and the difference is exactly why a process can show a high Cpk while its X̄ chart still demands investigation.

This guide builds both charts from a complete 25-subgroup sample. Within-subgroup ranges remain stable, but the process mean shifts after subgroup 15. The result is deliberately useful: the R chart passes its immediate check while the X̄ chart exposes a second operating state.

One subgroup produces two signals

R chart

Is the short-term variation inside each subgroup consistent?

Each point is the largest minus the smallest value in one subgroup. A high range can indicate a short-term special cause, measurement issue, material difference, or inconsistent process condition.

Interpret this chart first.

X̄ chart

Are subgroup averages consistent with one process location?

Each point is the mean of one subgroup. The chart can reveal shifts, trends, cycles, and unusual means that remain hidden when all measurements are pooled into one histogram.

Interpret after variation is understood.
FIRSTR chart · within-subgroup variation
THENX̄ chart · process location

If the R chart is unstable, the estimate of within-subgroup variation used to construct the X̄ limits is not reliable as one common baseline. Investigate the variation signal before treating an X̄ result as the final process-location conclusion.

Rational subgrouping determines what the chart can see

A rational subgroup should contain observations produced under conditions expected to be as similar as practical. The variation within a subgroup estimates short-term common-cause variation. Differences between subgroup averages then reveal changes across time, setups, lots, tools, or other meaningful production intervals.

WITHIN A SUBGROUPKeep the window short and meaningfulFor example, five consecutive pieces from one stable machine condition.
BETWEEN SUBGROUPSPreserve time and process orderSubgroups should retain the sequence in which process changes could occur.
AVOIDConvenient but mixed groupingsDo not group values only because they share a date, file, or reporting category.

Subgroup choice is an engineering model of the process. Five measurements from five different machines do not estimate the same short-term variation as five consecutive pieces from one machine. Both arrangements can be calculated, but the limits answer different questions.

Calculate the limits from subgroup means and ranges

For each subgroup i, calculate its mean X̄i and range Ri. Then average the subgroup means to obtain the grand mean X̄̄ and average the subgroup ranges to obtain R̄.

Subgroup statistics
i = Σxij ÷ n
Ri = max(xij) − min(xij)
Center lines
X̄ chart CL = X̄̄
R chart CL = R̄
X̄ chart limits
UCL = X̄̄ + A2 × R̄
LCL = X̄̄ − A2 × R̄A2 depends on constant subgroup size n.
R chart limits
UCLR = D4 × R̄
LCLR = D3 × R̄D3 and D4 also depend on subgroup size n.
Subgroup size nA2D3D4
21.88003.267
31.02302.575
40.72902.282
5 · used here0.57702.115
60.48302.004
70.4190.0761.924
80.3730.1361.864
90.3370.1841.816
100.3080.2231.777

The range method is commonly used for small subgroups. As subgroup size grows, an X̄–S chart generally uses the subgroup standard deviation more efficiently. When subgroup size is one, an individuals-and-moving-range approach is a different chart—not an X̄–R chart with missing values.

Worked example: the mean changes while the range remains stable

The prepared dataset contains 25 subgroups of five diameter measurements. Subgroups 1–15 operate near 10.000 mm. Subgroups 16–25 operate near 10.035 mm. The within-subgroup patterns and ranges remain nearly unchanged.

SUBGROUPS25
SUBGROUP SIZE5
GRAND MEAN10.01448
AVERAGE RANGE0.03360
R SIGNALS0
View all 125 measurements and subgroup statistics
SGx1x2x3x4x5R
All measurements are in millimetres. Values are displayed to three decimals; calculations use the underlying values shown.
X̄ limits
UCL = 10.01448 + 0.577 × 0.03360 = 10.03387
LCL = 10.01448 − 0.577 × 0.03360 = 9.99509
R limits
UCL = 2.115 × 0.03360 = 0.07106
LCL = 0 × 0.03360 = 0

The product charts make the shift visible

The charts below are generated from the same 125 readings using the X̄–R graph treatment implemented in the Mechatrovich SPC workflow. Hover over each point for subgroup values and signal labels.

X̄–R Stability Report — Diameter

25 rational subgroups · n = 5 · A2 = 0.577 · D3 = 0 · D4 = 2.115

INVESTIGATE MEAN SHIFT
X̄̄10.01448
0.03360
R SIGNALS0
X̄ LIMIT SIGNALS8
LONGEST SIDE RUN15

R Chart / Within-Subgroup Variation

Read first

X̄ Chart / Subgroup Average

Read after the R chart

The R chart remains within its calculated limits. The X̄ chart shows two separated bands, eight means above the UCL, and a sustained side-of-center pattern. The pooled process is not one stable location.

01
The R chart supports a common short-term variation estimate

All subgroup ranges lie between 0.032 and 0.035 mm, far below the R-chart UCL. No single subgroup shows unusually large within-subgroup spread.

02
The X̄ chart rejects one stable process location

Subgroups 16, 17, 19, 20, 21, 22, 24, and 25 exceed the upper control limit. The visible level change begins at subgroup 16 and persists through subgroup 25.

03
The likely investigation boundary is between subgroups 15 and 16

Check setup, adjustment, tool change, material lot, machine state, program revision, operator, temperature, or another recorded event at that boundary. The chart locates the change; process evidence identifies the cause.

Why a high Cpk does not cancel the control-chart signal

If the same 125 measurements are compared with specifications of 9.800 and 10.200 mm using one overall sample standard deviation, the pooled Cpk is approximately 2.92. That sounds excellent—but it combines two distinct process levels.

2.92POOLED CPK

Capable-looking, but not statistically stable

The specification is wide relative to both operating levels, so no measurement is close to a limit. The X̄ chart still proves that the process location changed. Capability and stability answer different questions; the high index cannot explain or approve the shift.

After the cause is identified, separate the operating states and decide which one represents the intended process. Establish a defensible baseline before making a capability claim. If the higher level is an approved permanent improvement, new limits may eventually be justified. If it is an assignable cause, correct it and retain limits that represent the controlled process.

Control-limit violations are only the first signal rule

Point beyond a limitA subgroup statistic beyond a 3σ control limit is an immediate special-cause signal.
Run on one sideSeveral consecutive points on one side of the center line can reveal a sustained shift before every point crosses a limit.
Trend or patternConsistent rise, fall, alternation, cycles, or clustering can reveal structured non-random behavior.

Additional rules increase sensitivity, but they also increase false alarms. Choose and document the rule set before reviewing the chart. Applying every available rule after seeing the data encourages overreaction and makes the monitoring plan difficult to audit.

A signal starts an investigation; it does not name the cause. Do not delete the point, recalculate the limits, and continue without evidence. Record what changed, whether the cause is assignable and preventable, what action was taken, and whether subsequent data confirm the result.

Phase I limits and Phase II monitoring serve different jobs

Phase I · establish the baseline

Use historical or preliminary subgroups to find special causes, understand process structure, and estimate limits from a period judged representative. Removing a subgroup requires technical evidence, not merely an inconvenient signal.

Phase II · monitor the process

Apply established limits to future subgroups. Do not continuously recalculate limits after every new point; moving the reference with the process can hide the change the chart is meant to detect.

The 25-subgroup sample here is a Phase I illustration. Because the shift is built into the baseline data, the first conclusion is not “publish these limits.” The first conclusion is “investigate and separate the two states.” Limits should be re-estimated only after the intended controlled state is defined.

A practical X̄–R review sequence

Confirm the chart is appropriate

Use continuous data, constant small subgroup size, and a defensible rational-subgroup definition.

Verify measurement quality and data order

Check MSA evidence, units, rounding, subgroup IDs, timestamps, missing values, and collection sequence.

Calculate every subgroup mean and range

Retain the raw values so any signal can be traced to the original measurements.

Read the R chart first

Investigate unusual within-subgroup variation before accepting one pooled variation estimate.

Read the X̄ chart and the preselected rules

Look beyond limit violations to sustained shifts, trends, or other documented patterns.

Connect signals with process events

Stratify by machine, cavity, tool, lot, material, operator, setup, temperature, maintenance, and other known sources.

Define the controlled state before capability

Only then estimate process capability using data and a sigma method that represent the intended state.

Common X̄–R mistakes

  • Using specification limits as control limits.
  • Creating subgroups from convenient reporting buckets rather than process logic.
  • Reading the X̄ chart before resolving an unstable R chart.
  • Changing subgroup size while using one constant set.
  • Using X̄–R for individual measurements or very large subgroups without reviewing chart suitability.
  • Sorting or aggregating away the production sequence.
  • Deleting signals and recalculating limits without technical evidence.
  • Recalculating limits so frequently that the baseline follows the shift.
  • Using a high Cpk as evidence that a control-chart signal does not matter.

Continue from the chart to the workflow

Use the free X̄–R calculator for a small subgroup check, or return to the capability guide when the process has a defensible stable state. The complete SPC toolkit adds full subgroup tables, signal evaluation, logs, saved studies, and report output.

For a full offline subgroup workflow with both control charts, extended rule checks, a signal log, and reporting, continue to the Mechatrovich X̄–R SPC Toolkit.

References and method sources

  1. NIST/SEMATECH e-Handbook, Shewhart X̄ and R and S Control Charts — formulas, constants, chart selection, and range-method efficiency.
  2. NIST, What are Variables Control Charts? — control limits versus specifications, baseline-sample context, recalculation guidance, and Western Electric rules.
  3. AIAG & VDA SPC Manual, 1st Edition (2026) — current automotive-industry framework for SPC implementation, monitoring, performance, and capability.

Need the complete X̄–R workflow?

Keep subgroup data, both control charts, signal rules, the investigation log, and reporting in one offline study.

View the SPC toolkit →