X-Bar and R Chart Control Limit Calculator
This calculator gives the control limits of an X-bar and R chart from three values: the grand mean, the average range R-bar of the subgroups, and the subgroup size n from 2 to 10. It returns the constants A2, d2, D3 and D4 for that subgroup size, the upper and lower control limits of the X-bar chart and of the R chart, and the estimated process standard deviation sigma.
The constants A2, D3 and D4 are the NIST values; d2 comes from the MIT 2.810 table. The limits hold for data from a normal distribution, where the subgroups are the successive samples of n observations of the process. The limits and sigma are in the unit of the measurement; the constants have no unit.
Calculator
X-bar chart
R chart
Constants for n
Process
X-bar chart: UCL = 50 + 0.577 × 2 = 51.15; LCL = 50 − 0.577 × 2 = 48.85.
R chart: UCL = 2.115 × 2 = 4.230; LCL = 0 × 2 = 0.
Sigma = 2 / 2.326 = 0.8598.
Center lines: the X-bar chart is centered on the grand mean and the R chart on the average range, both as typed.
Theory: control limits from the average range
The formulas
σ = / d2
UCL = + A2, LCL = − A2, with A2 = 3 / (d2√n)
UCLR = D4, LCLR = D3, with D4 = 1 + 3d3/d2 and D3 = max(0, 1 − 3d3/d2)
Symbols
- grand mean, the center line of the X-bar chart; unit of the measurement
- average range of the subgroups, the center line of the R chart; unit of the measurement
- n
- subgroup size, the number of observations in each successive sample; no unit
- σ
- standard deviation of the process, estimated from ; unit of the measurement
- d2
- constant of the relation = d2σ for normal data; no unit
- d3
- standard deviation of R/σ; no unit
- A2
- factor of the X-bar chart limits, 3 / (d2√n); no unit
- D3, D4
- factors of the lower and upper R chart limits; no unit
- UCL, LCL
- upper and lower control limits; unit of the measurement
Where the formulas come from
NIST gives the relation = d2σ (Patnaik) between the average range of the subgroups and the standard deviation σ of the process, and the constants d2 and d3, for data from a normal distribution; the subgroups are the successive samples of n observations of the process. So σ is estimated by /d2. The X-bar chart limits are the grand mean plus and minus 3σ/√n, that is A2 with A2 = 3/(d2√n). The R chart limits are D4 and D3, with D4 = 1 + 3d3/d2 and D3 = max(0, 1 − 3d3/d2).
The expression 1 − 3d3/d2 equals 2 − D4, so it is negative for n up to 6, where D4 is above 2. D3 is then set to 0, as NIST prints, and the lower R limit is 0 there.
When the formulas do not hold
The limits hold under the normal model described above; the page claims nothing for other distributions. The range method is satisfactory for n up to about 10; for larger subgroups NIST prefers the standard deviation, which is why this calculator stops at n = 10.
Constants used by the page
NIST prints A2, D3 and D4 for n = 2 to 10. NIST does not print d2: it comes from the MIT 2.810 table, which cites the AIAG manual for SPC. That table prints D4 2.574 for n = 3 and 2.114 for n = 5, where NIST prints 2.575 and 2.115; the page uses the NIST values.
| n | A2 | D3 | D4 | d2 |
|---|---|---|---|---|
| 2 | 1.880 | 0 | 3.267 | 1.128 |
| 3 | 1.023 | 0 | 2.575 | 1.693 |
| 4 | 0.729 | 0 | 2.282 | 2.059 |
| 5 | 0.577 | 0 | 2.115 | 2.326 |
| 6 | 0.483 | 0 | 2.004 | 2.534 |
| 7 | 0.419 | 0.076 | 1.924 | 2.704 |
| 8 | 0.373 | 0.136 | 1.864 | 2.847 |
| 9 | 0.337 | 0.184 | 1.816 | 2.970 |
| 10 | 0.308 | 0.223 | 1.777 | 3.078 |
Worked example
Grand mean 50, average range 2, subgroup size n = 5 (the sources print no example, so this one is the page's own). From the table: A2 = 0.577, D3 = 0, D4 = 2.115, d2 = 2.326.
- Check of A2: √5 = 2.23607; d2√n = 2.326 × 2.23607 = 5.20109; 3 / 5.20109 = 0.576802, and the table value is 0.577.
- Sigma: σ = 2 / 2.326 = 0.859845, which the tool prints as 0.8598.
- R chart: UCLR = 2.115 × 2 = 4.23000; LCLR = 0 × 2 = 0.
- Half-width of the X-bar limits: A2 = 0.577 × 2 = 1.15400.
- X-bar chart lower limit: LCL = 50 − 1.15400 = 48.8460, which the tool prints as 48.85.
- X-bar chart upper limit: UCL = 50 + 1.15400 = 51.1540, which the tool prints as 51.15.
Source
NIST/SEMATECH e-Handbook of Statistical Methods, section 6.3.2.1, Shewhart X-bar and R and S Control Charts. MIT 2.810, Tables of Constants for Control Charts.
How to use the calculator
- Type the grand mean in the unit of the measurement. Any finite number is accepted, including negative values.
- Type the average range R-bar in the same unit. It must be 0, or 1 × 10-300 or more.
- Choose the subgroup size n, the number of observations in each subgroup, from 2 to 10.
- Read the constants A2, d2, D3 and D4, the limits of the X-bar chart and of the R chart, and the estimated sigma. The results update as you type.
- Check the formula line under the results, which shows your values substituted into each formula.
- Draw the center lines at the grand mean and at R-bar, and the control limits above and below them.
Frequently asked questions
What are the formulas for the control limits of the X-bar and R chart?
The X-bar chart limits are UCL = grand mean + A2 × R-bar and LCL = grand mean − A2 × R-bar. The R chart limits are UCL = D4 × R-bar and LCL = D3 × R-bar. The constants A2, D3 and D4 depend on the subgroup size n. The center lines are the grand mean and the average range.
What is the A2 constant for a subgroup size of 5?
For n = 5, A2 is 0.577. It comes from A2 = 3/(d2 × sqrt(n)) with d2 = 2.326, so the X-bar chart limits are the grand mean plus and minus 0.577 × R-bar. With a grand mean of 50 and an R-bar of 2, they are 48.85 and 51.15.
Why is the lower control limit of the R chart 0?
D3 is 0 for subgroups of 2 to 6. D3 = max(0, 1 − 3 × d3/d2), and 1 − 3 × d3/d2 equals 2 − D4, which is negative for n up to 6 because D4 is above 2. D3 is then set to 0, as NIST prints, so the lower R limit D3 × R-bar is 0. From n = 7, D3 is above 0: 0.076 for n = 7 and 0.223 for n = 10.
How is sigma estimated from the average range?
Sigma is estimated by R-bar/d2. NIST gives the relation R-bar = d2 × sigma (Patnaik) for data from a normal distribution, where d2 depends on the subgroup size. For n = 5, d2 is 2.326, so an R-bar of 2 gives a sigma of 2/2.326 = 0.8598 in the unit of the measurement.
Disclaimer
This calculator is for preliminary estimation only. It is not a substitute for a control chart study or review by a qualified engineer.