MECHOWL QUALITY ANALYSIS AI
X-bar R chart maker: control limits, A2 D3 D4 constants and the Western Electric rules
Paste subgroup data from Excel to get the X-bar R chart with its center lines and control limits, the out-of-control signals of the tests in JIS Z 9020-2, and the A2, D3, D4 constants with the working.
Last updated
Your data is not sent. Everything is computed in your browser
Data
Column names in the first row. Tabs or commas, full-width digits, thousands separators and blanks are read.
Read 125 rows and 3 columns.
More settings (Subgroups for the limits, Unit, Chart title, Period and more)
Empty: all subgroups. For example, 20: the first 20 subgroups set the control limits, and the later subgroups are judged against the same lines.
e.g. mm.
Empty: “X̄-R chart”.
e.g. 1–31 Oct 2026. Written on the chart and the report.
Empty: all rows. A value: only the rows with that value.
Judgement rules
By default, the page uses the eight tests shown as examples in JIS Z 9020-2 annex B (the Western Electric rules, with the point counts of Nelson (1984)). With “Set of tests” you can switch to the examples in figure 3 of the standard (four). Switch tests on or off, or change their numbers, to match your company's or industry's rules; changes are written in the report.
By default the eight tests of annex B. With the examples of figure 3, the switches and numbers below are not used: points are marked for ① a point beyond a control limit, ② 7 points in a row on one side and ③ 7 points in a row increasing or decreasing.
Source of the default: JIS Z 9020-2:2025
Result
UCL 10.01856 mm: Out-of-control signals (5 subgroups)
Result of the sample data
Out-of-control signals (5 subgroups)
Tests used: 1, 2, 3, 4, 5, 6, 7, 8 (from the eight tests shown as examples in JIS Z 9020-2 annex B (the Western Electric rules)). A signal is a prompt to check the state of the process, not a pass or fail decision.
- Upper control limit of the X̄ chart UCL
- 10.01856 mm
- Lower control limit of the X̄ chart LCL
- 9.98786 mm
How to read it
What the chart shows
- Out-of-control signals at subgroups 11/18, 11/20, 11/22, 11/23, 11/25. The tests that marked them: Test 5 (2 of 3 beyond 2σ); Test 6 (4 of 5 beyond 1σ).
Common misreadings
- Control limits are not specification limits. A point can be inside the control limits and outside the specification, and the other way round.
- Control limits computed with the signalling points included are wider. Remove the subgroups whose cause you have found and compute the limits again (“Subgroups for the limits”).
Next steps
- Check the records for a change in the 4Ms (man, machine, material, method) at the dates and times of the marked subgroups.
Numbers
| Subgroup size n | 5 |
|---|---|
| Number of subgroups k | 25 |
| Grand mean X̿ | 10.00321 mm |
| Average range R̄ | 0.02660 mm |
| Upper control limit of the X̄ chart UCL | 10.01856 mm |
| Lower control limit of the X̄ chart LCL | 9.98786 mm |
| Upper control limit of the R chart UCL | 0.05623 mm |
| Lower control limit of the R chart LCL | None (subgroup size 6 or less) |
| Estimated within-subgroup standard deviation σ̂ | 0.011436 mm |
| Subgroups with out-of-control signals | 5 |
Calculation steps
- Grand mean
X̿ = Σ X̄ᵢ / kk = 25 → X̿ = 10.00321 - Average range
R̄ = Σ Rᵢ / kR̄ = 0.02660 - Constants
Constants for subgroup size n = 5 (3 decimals, as in the JIS table)A₂ = 0.577, D₃ = — (none), D₄ = 2.114, d₂ = 2.326 (constants version constants-2026-11-17e) - X̄ chart
UCL, LCL = X̿ ± A₂R̄10.00321 ± 0.577 × 0.02660 = 10.01856, 9.98786 - R chart
UCL = D₄R̄, LCL = D₃R̄2.114 × 0.02660 = 0.05623, None (subgroup size 6 or less) - 1σ for the tests
1σ (X̄) = A₂R̄ / 30.005116
Mean, range and signals by subgroup
| Subgroup | Mean X̄ | Range R | Tests met |
|---|---|---|---|
| 11/01 | 10.0002 | 0.02 | |
| 11/02 | 10.0002 | 0.042 | |
| 11/03 | 10.001 | 0.021 | |
| 11/04 | 9.9976 | 0.045 | |
| 11/05 | 9.9982 | 0.032 | |
| 11/06 | 9.9942 | 0.026 | |
| 11/07 | 10.0022 | 0.014 | |
| 11/08 | 10.0048 | 0.019 | |
| 11/09 | 10.0022 | 0.028 | |
| 11/10 | 9.9976 | 0.033 | |
| 11/11 | 10.0048 | 0.019 | |
| 11/12 | 10.001 | 0.028 | |
| 11/13 | 10.002 | 0.013 | |
| 11/14 | 9.997 | 0.028 | |
| 11/15 | 9.9952 | 0.02 | |
| 11/16 | 10.0054 | 0.037 | |
| 11/17 | 9.9972 | 0.02 | |
| ▲ 11/18 | 9.9964 | 0.015 | X̄: 6 |
| 11/19 | 10.0136 | 0.046 | |
| ▲ 11/20 | 10.0152 | 0.026 | X̄: 5 |
| 11/21 | 10.01 | 0.03 | |
| ▲ 11/22 | 10.014 | 0.024 | X̄: 5,6 |
| ▲ 11/23 | 10.0114 | 0.027 | X̄: 6 |
| 11/24 | 10.0066 | 0.016 | |
| ▲ 11/25 | 10.0122 | 0.036 | X̄: 6 |
Tests used (the eight tests shown as examples in JIS Z 9020-2 annex B (the Western Electric rules))
| Test | Description | Used |
|---|---|---|
| 1 | 1 point more than 3σ from the center line (beyond a control limit) | ○ |
| 2 | 9 points in a row on the same side of the center line | ○ |
| 3 | 6 points in a row steadily increasing or decreasing | ○ |
| 4 | 14 points in a row alternating up and down | ○ |
| 5 | 2 out of 3 points in a row more than 2σ from the center line, on the same side | ○ |
| 6 | 4 out of 5 points in a row more than 1σ from the center line, on the same side | ○ |
| 7 | 15 points in a row within 1σ of the center line | ○ |
| 8 | 8 points in a row more than 1σ from the center line, on either side | ○ |
The results are reference values based on the data you entered and the formulas and criteria shown. They are not a quality guarantee or a pass/fail decision. The final decision rests with you.
References
- ISO 7870-2:2023 Control charts — Part 2: Shewhart control charts · ISO
- NIST/SEMATECH e-Handbook of Statistical Methods, 6.3 Univariate and Multivariate Control Charts · NIST · Open
- D. C. Montgomery, Introduction to Statistical Quality Control, 8th ed., 2019 · Wiley
- The Shewhart Control Chart—Tests for Special Causes · Journal of Quality Technology 16(4), 237–239 (L. S. Nelson, 1984)
- NIST/SEMATECH e-Handbook of Statistical Methods, 6.3.2 What are Variables Control Charts? · NIST · Open
- NIST/SEMATECH e-Handbook of Statistical Methods, 6.3.2.1 Shewhart X-bar and R and S Control Charts · NIST · Open
- JIS Z 9020-2:2025 Control charts — Part 2: Shewhart control charts (in Japanese) · Japanese Standards Association (JSA)
Standards are shown by number and title only.
X-bar R chart explained
An X-bar R chart (X̄-R chart) plots the mean X̄ and the range R of each subgroup (a few values taken in a row under the same conditions) in time order, and compares them with the center line and the control limits (usually the center line ± 3σ) to show whether something unusual has changed in the process. The X̄ chart shows changes in the process mean; the R chart shows changes in the variation within subgroups.
X-bar R chart by hand: step by step
- Take a few values in a row under the same conditions as one subgroup (subgroup size n, usually 4 or 5), and collect 20 to 25 subgroups or more.
- Compute the mean X̄ and the range R (largest − smallest) of each subgroup.
- Compute the grand mean X̿ and the average range R̄, and the control limits with the constants A₂, D₃ and D₄ for the subgroup size: X̿ ± A₂R̄ for X̄, D₄R̄ and D₃R̄ for R.
- Plot the points in time order and draw the center lines and the control limits.
- Look for points beyond the control limits and for points that meet a pattern test (such as 9 points in a row on one side), and find what changed in the 4Ms at that time.
Worked examples
Example 1: Subgroup size 3, 4 subgroups (no LCL for R)
Subgroup Value 1 1 1 2 1 3 2 2 2 3 2 4 3 3 3 4 3 5 4 2 4 2 4 2
Means 2, 3, 4, 2 → X̿ = 11/4 = 2.75. Ranges 2, 2, 2, 0 → R̄ = 1.5. Constants for n = 3 (table values): A₂ = 1.023, D₄ = 2.575, D₃ = 0 (none). UCL = 2.75 + 1.023 × 1.5 = 4.2845, LCL = 1.2155; R chart UCL = 2.575 × 1.5 = 3.8625, no LCL.
Example 2: Subgroup size 7 (a positive LCL for R)
x1 x2 x3 x4 x5 x6 x7 1 2 3 4 5 6 7 2 3 4 5 6 7 8
Data side by side (one row = one subgroup). Means 4 and 5 → X̿ = 4.5; ranges 6 and 6 → R̄ = 6. Constants for n = 7 (table values): A₂ = 0.419, D₃ = 0.076, D₄ = 1.924. UCL = 4.5 + 0.419 × 6 = 7.014, LCL = 1.986; R chart UCL = 1.924 × 6 = 11.544, LCL = 0.076 × 6 = 0.456.
Example 3: Subgroup size 10 (the largest on this page)
Value 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10
Settings: Subgroup size (without a subgroup column) = 10
One column cut into subgroups of 10 from the top. Means 4.5 and 5.5 → X̿ = 5, R̄ = 9. Constants for n = 10 (table values): A₂ = 0.308, D₃ = 0.223, D₄ = 1.777. UCL = 5 + 0.308 × 9 = 7.772; R chart LCL = 0.223 × 9 = 2.007.
Example 4: Subgroup size 11 (outside this page)
x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 1 2 3 4 5 6 7 8 9 10 11 2 3 4 5 6 7 8 9 10 11 12
A subgroup size of 11 is outside the X̄-R chart of this page (2 to 10). The page points to the X̄-s chart.
Example 5: Unequal subgroup sizes
Subgroup Value 1 1 1 2 2 1 2 2 2 3
Subgroup 1 has 2 values and subgroup 2 has 3. The X̄-R constants depend on the subgroup size, so the page says the chart cannot be used for unequal subgroups.
Example 6: Test 5 with more points beyond than points (input error)
Subgroup Value 1 1 1 2 2 2 2 3
Settings: Test 5: points beyond = 5
“5 out of 3 points in a row” cannot be. The page shows an input error in the test settings.
Common mistakes
- Drawing the specification limits instead of the control limits (a control chart shows whether the process is stable, not whether parts meet the specification).
- Mixing data from different conditions (another machine, another lot) in one subgroup: the control limits widen and changes no longer show.
- Going on using control limits that still include the subgroups whose special cause has been found.
FAQ
- What subgroup size should I use?
- Subgroups of 4 or 5 are common. This page takes 2 to 10. For 11 or more, use the X-bar S chart.
- Which tests should I use?
- By default, this page uses the eight tests shown as examples in annex B of JIS Z 9020-2 (the Western Electric rules). With “Set of tests” you can switch to the examples of figure 3 of the standard (four). Test 1 (a point beyond a control limit) is always used. The more of the other tests you use, the smaller the changes you notice, but the more often a test is met by chance. Switch tests or change their numbers on this page to match your company or industry rules.
- Is my data sent anywhere?
- No. The calculations and the chart are made in your browser only.
Scope
An X-bar R chart of equal subgroups of 2 to 10 values: means and ranges. The control limits are 3σ (constants A₂, D₃, D₄).
Not covered by this tool:
- Subgroups of different sizes (use the X̄-s chart or a standardised chart).
- Control charts for attributes, such as defectives and defects (p, np, c and u charts).
Excel template: X-bar R chart
A template with the column names and sample values only (no formulas). Enter your values, then copy the range and paste it into the box above.