Queendom Tools

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

Upper control limit, UCL51.15unit of the measurement
Lower control limit, LCL48.85unit of the measurement

R chart

Upper control limit, UCL4.230unit of the measurement
Lower control limit, LCL0unit of the measurement

Constants for n

A20.5770no unit
d22.326no unit
D30no unit
D42.115no unit

Process

Estimated sigma, R-bar/d20.8598unit of the measurement

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

σ = R / d2

UCLX = X + A2R,   LCLX = X − A2R,   with A2 = 3 / (d2√n)

UCLR = D4R,   LCLR = D3R,   with D4 = 1 + 3d3/d2 and D3 = max(0, 1 − 3d3/d2)

Symbols

X
grand mean, the center line of the X-bar chart; unit of the measurement
R
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 R; unit of the measurement
d2
constant of the relation R = 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 R = d2σ (Patnaik) between the average range R 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 R/d2. The X-bar chart limits are the grand mean plus and minus 3σ/√n, that is A2R with A2 = 3/(d2√n). The R chart limits are D4R and D3R, 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.

nA2D3D4d2
21.88003.2671.128
31.02302.5751.693
40.72902.2822.059
50.57702.1152.326
60.48302.0042.534
70.4190.0761.9242.704
80.3730.1361.8642.847
90.3370.1841.8162.970
100.3080.2231.7773.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.

  1. 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.
  2. Sigma: σ = 2 / 2.326 = 0.859845, which the tool prints as 0.8598.
  3. R chart: UCLR = 2.115 × 2 = 4.23000; LCLR = 0 × 2 = 0.
  4. Half-width of the X-bar limits: A2R = 0.577 × 2 = 1.15400.
  5. X-bar chart lower limit: LCL = 50 − 1.15400 = 48.8460, which the tool prints as 48.85.
  6. 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

  1. Type the grand mean in the unit of the measurement. Any finite number is accepted, including negative values.
  2. Type the average range R-bar in the same unit. It must be 0, or 1 × 10-300 or more.
  3. Choose the subgroup size n, the number of observations in each subgroup, from 2 to 10.
  4. 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.
  5. Check the formula line under the results, which shows your values substituted into each formula.
  6. 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.