Free tool
Control chart generator
Paste your measurements or defect counts; get an X̄–R, X̄–S, I–MR, p or c control chart with its control limits and out-of-control points, step by step.
Result
- In control
- Signal (rule broken)
- Center line (CL)
- Control limits (UCL, LCL)
Signals
Calculation steps
What a control chart shows
A control chart (Shewhart chart) compares how a process changes over time with limits calculated from the process's own natural variation. If the points stay inside the limits and scatter randomly, the process is "in control": its variation comes from common causes. Points outside the limits, or in particular patterns, may point to a special cause worth investigating (tool wear, a new batch of material, a shifted setting).
The example in the tool is shaft diameters around 25 mm measured in 20 subgroups of 5. On the X̄–R chart X̄̄ = 25.0025 mm and R̄ = 0.0243 mm; the X̄ chart limits are UCL 25.0165 mm and LCL 24.9885 mm, and the R chart limits are UCL 0.0513 mm and LCL 0. The mean of subgroup 14 (25.0332 mm) is above the upper control limit, so it is marked with a red diamond; the R chart has no signal. That means the mean shifted in that subgroup, not the spread: look at what changed at that time.
Formulas
- X̄–R: CL = X̄̄; UCL/LCL = X̄̄ ± A2·R̄. R chart: CL = R̄; UCL = D4·R̄, LCL = D3·R̄.
- X̄–S: UCL/LCL = X̄̄ ± A3·s̄. S chart: CL = s̄; UCL = B4·s̄, LCL = B3·s̄.
- I–MR: CL = x̄; UCL/LCL = x̄ ± 2.660·MR̄ (2.660 = 3/d2 for n = 2). MR chart: UCL = 3.267·MR̄, LCL = 0.
- p: p̄ = total defective / total inspected; UCL/LCL = p̄ ± 3√(p̄(1 − p̄)/nᵢ), clipped to 0…1. If the sample size varies, the limits differ for each subgroup.
- c: CL = c̄; UCL/LCL = c̄ ± 3√c̄, LCL at least 0.
Western Electric rules 2–4 (the 2σ and 1σ zones, 8 points on one side) assume a normal distribution and constant limits, so they are applied only on the X̄ and I charts; the R, S, MR, p and c charts use rule 1 (beyond 3σ) only. The rules are signals to investigate, not proof.
Control chart constants table
Constants for variables control charts, subgroup size (n) 2–10. The I–MR chart uses E2 = 2.660 and D4 = 3.267 for the moving range (the n = 2 row).
| n | A2 | A3 | B3 | B4 | D3 | D4 | d2 | c4 |
|---|---|---|---|---|---|---|---|---|
| 2 | 1.880 | 2.659 | 0 | 3.267 | 0 | 3.267 | 1.128 | 0.7979 |
| 3 | 1.023 | 1.954 | 0 | 2.568 | 0 | 2.574 | 1.693 | 0.8862 |
| 4 | 0.729 | 1.628 | 0 | 2.266 | 0 | 2.282 | 2.059 | 0.9213 |
| 5 | 0.577 | 1.427 | 0 | 2.089 | 0 | 2.114 | 2.326 | 0.9400 |
| 6 | 0.483 | 1.287 | 0.030 | 1.970 | 0 | 2.004 | 2.534 | 0.9515 |
| 7 | 0.419 | 1.182 | 0.118 | 1.882 | 0.076 | 1.924 | 2.704 | 0.9594 |
| 8 | 0.373 | 1.099 | 0.185 | 1.815 | 0.136 | 1.864 | 2.847 | 0.9650 |
| 9 | 0.337 | 1.032 | 0.239 | 1.761 | 0.184 | 1.816 | 2.970 | 0.9693 |
| 10 | 0.308 | 0.975 | 0.284 | 1.716 | 0.223 | 1.777 | 3.078 | 0.9727 |
The constants are derived from d2, d3 and c4 (A2 = 3/(d2√n), D3/D4 = 1 ∓ 3d3/d2, A3 = 3/(c4√n), B3/B4 = 1 ∓ 3√(1 − c4²)/c4; lower factors that come out negative are set to 0). Every value in the table is recalculated from these definitions and checked in a unit test.
Reading a control chart correctly
- Dispersion chart first: if the R, S or MR chart is out of control, the X̄ and I limits are not reliable either; stabilise the spread first.
- Limits get fixed: points with a found special cause are removed and the limits recalculated; then the limits are fixed and new data is plotted against them.
- In control is not the same as capable: check the fit to the tolerance with the Cp and Cpk calculator. To rank defect causes, use the Pareto chart generator.
From typing in measurements to collecting them automatically
When measurements are collected from the machine, the gauge or the PLC, the control chart updates with every part and a signal shows at once. We describe how on our process monitoring and machine data collection pages. All tools are on the tools page.
Sources
- D. C. Montgomery, Introduction to Statistical Quality Control, Wiley: factors for variables control charts and the formulas.
- ASTM, Manual on Presentation of Data and Control Chart Analysis (MNL 7, formerly STP 15D): control chart factors.
- AIAG, Statistical Process Control (SPC) Reference Manual, 2nd edition, 2005.
- Western Electric Co., Statistical Quality Control Handbook, 1956: rules 1–4.
- NIST/SEMATECH e-Handbook of Statistical Methods, section 6.3: control charts.
Checked 24 October 2026. On the same date the constants were verified by recalculating them from the definitions of c4, d2 and d3.
Frequently asked questions
Common questions
How do you make a control chart?
Collect measurements or counts in production order, choose the right chart type and calculate the center line (the average) and the control limits. For variables data the limits come from the subgroup range or standard deviation; for attribute data from the binomial (p) or Poisson (c) distribution. Then plot the points in order and investigate points outside the limits or unusual patterns. The generator does these steps with your data and shows the calculation.
Which control chart should I use?
For a measured value (diameter, weight, temperature): X̄–R if you take subgroups of 2–10 parts, X̄–S for larger subgroups or when software does the arithmetic, I–MR for single readings. For attribute data: a p chart for the fraction of defective parts (the sample size may vary), a c chart for the number of defects on a unit of constant size.
Are control limits the same as specification limits?
No. Specification (tolerance) limits are set by the customer or the design; control limits are calculated from the process's own data and natural variation. A process can be in control and still make parts out of tolerance. To see how well it fits the tolerance, calculate Cp and Cpk.
Where do the control chart constants (A2, D3, D4) come from?
They are derived from the expected values of the subgroup range and standard deviation for a normally distributed process (d2, d3, c4): A2 = 3/(d2√n), D3 and D4 = 1 ∓ 3d3/d2, A3 = 3/(c4√n), B3 and B4 = 1 ∓ 3√(1 − c4²)/c4. The values match the ASTM, Montgomery and AIAG tables; the table is further down this page.
What are the Western Electric rules?
Four rules from Western Electric's 1956 Statistical Quality Control Handbook: one point beyond 3σ; 2 of 3 consecutive points beyond 2σ on the same side; 4 of 5 consecutive points beyond 1σ on the same side; 8 consecutive points on the same side of the center line. They are signals to investigate, not proof of a special cause, and each added rule also raises the chance of a false alarm.
How many subgroups do I need?
At least 20–25 subgroups are usually recommended for calculating limits. The tool works with fewer but treats the limits as provisional and says so.

Next step
Let’s turn your goal into a clear engineering scope.
Tell us about your plant, your machines and your goal. An integration engineer will set up a discovery call with you.