Skip to content

Control chart generator (SPC)

Paste your process measurements and get the control limits, both charts and every special-cause signal explained in plain words. It also draws the p chart for defectives.

Chart type and data

One subgroup per line (values separated by spaces, semicolons or TAB), or one value per line for I-MR. A label may start the line.

Result

In statistical control

No points outside the limits and no suspicious runs. The variation comes from common causes only.

X̄ chart (means)

UCL 10.0262CL 10.0099LCL 9.99351: 10.01122: 10.0133: 10.00524: 10.00885: 10.01466: 10.00967: 10.00848: 10.00689: 10.010410: 10.012811: 10.007412: 10.010613: 10.001214: 10.017415: 1016: 10.01617: 10.00618: 10.009619: 10.016420: 10.0116135791113151719

R chart (ranges)

UCL 0.0598CL 0.0283LCL 01: 0.0322: 0.0293: 0.0114: 0.0335: 0.0236: 0.0327: 0.0188: 0.0319: 0.04710: 0.03111: 0.01612: 0.02713: 0.03214: 0.02415: 0.02116: 0.02817: 0.04218: 0.03519: 0.03220: 0.022135791113151719

Control limits

ChartLCLCLUCL
X̄9.993510.009910.0262
R00.02830.0598
Estimated σ (within)
0.01217
Points
20 subgroups of 5

How to calculate control limits

Control limits sit 3 standard deviations from the center line. The standard deviation is estimated from the variation within subgroups, and the table constants already do that math.

Chart Center line Limits
X̄ (with R) X̿ X̿ ± A2 × R̄
R R̄ D3 × R̄ and D4 × R̄
X̄ (with S) X̿ X̿ ± A3 × S̄
S S̄ B3 × S̄ and B4 × S̄
I mean mean ± 2.66 × MR̄
MR MR̄ 0 and 3.267 × MR̄
p p̄ = total defectives ÷ total inspected p̄ ± 3 × √(p̄ × (1 − p̄) ÷ n)

Constants for the most common subgroup sizes (AIAG SPC manual):

n A2 D3 D4 d2
2 1.880 0 3.267 1.128
3 1.023 0 2.574 1.693
4 0.729 0 2.282 2.059
5 0.577 0 2.114 2.326

Worked example

The data in the calculator is 20 subgroups of 5 shafts, the same as in the Cp and Cpk calculator.

  1. Mean of the means: X̿ = 10.00985 mm
  2. Average range: R̄ = 0.0283 mm
  3. X̄ chart: UCL = 10.00985 + 0.577 × 0.0283 = 10.0262; LCL = 10.00985 − 0.01633 = 9.9935
  4. R chart: UCL = 2.114 × 0.0283 = 0.0598; LCL = 0

No mean and no range falls outside its limits and there are no suspicious runs: the process is in control. Now Cpk makes sense.

Switch the type to p chart for the second example: 15 days of final inspection, about 200 parts a day. The average proportion is p̄ = 100 ÷ 3,050 = 3.28%. On day 10, 19 of 210 parts were defective (9.05%), above that day’s 6.97% limit. Something different happened there. Once the cause is found and removed, day 10 leaves the calculation and p̄ drops to 81 ÷ 2,840 = 2.85%.

Because the sample size changes from day to day, the p chart limits change too: larger samples get tighter limits.

How to read the chart

The calculator applies the Western Electric rules (also known as Nelson rules) and explains each signal:

  1. One point outside the control limits. The strongest special-cause signal.
  2. 2 of 3 points in a row beyond 2σ on the same side. The process level may have shifted.
  3. 4 of 5 points in a row beyond 1σ on the same side. A smaller but persistent shift.
  4. 8 points in a row on the same side of the center line. The process mean has moved.
  5. 6 points in a row going up or down. A trend: tool wear, temperature, drift.

Always read the spread chart first (R, S or MR). If the spread is out of control, the limits of the means chart cannot be trusted, because they depend on R̄, S̄ or MR̄.

Common mistakes

  • Using spec limits as control limits. They answer different questions. The control chart tells you whether the process is stable; capability (Cpk) tells you whether it meets the tolerance.
  • Computing limits from the overall standard deviation. The chart uses within-subgroup variation. With the overall standard deviation, limits get wide and hide shifts between subgroups.
  • Adjusting the process for every point. Tweaking the machine when the point is inside the limits is reacting to common causes, and it increases variation.
  • Recalculating limits all the time. Set them from 20 to 25 stable subgroups and keep them. Recalculate only after a real process change.
  • Badly formed subgroups. Parts in a subgroup should be made in sequence under the same conditions. Mixing machines or shifts in one subgroup inflates R̄ and widens the limits.

Frequently asked questions

What is a control chart?

A plot of process measurements over time with a center line and two control limits computed from the data itself. Points inside the limits with no pattern mean normal variation (common causes). Points outside or odd runs point to a special cause to investigate.

How do you calculate X-bar R chart limits?

X̄ chart: UCL = X̿ + A2 × R̄ and LCL = X̿ − A2 × R̄. R chart: UCL = D4 × R̄ and LCL = D3 × R̄. X̿ is the mean of the subgroup means, R̄ the average range, and A2, D3, D4 come from the table by subgroup size (for n = 5: 0.577, 0 and 2.114).

Which control chart should I use?

For measurements in subgroups of 2 to 10 parts, X̄-R. For subgroups larger than 10, X̄-S. For one measurement at a time (batches, lab tests, slow processes), I-MR. For counts of defective parts in samples, the p chart.

What is the difference between control limits and specification limits?

Control limits come from the process: what it naturally does, 3 standard deviations from the mean. Specification limits come from the customer or the design: what the part must meet. A process can be in control and still make parts out of spec, which is what Cpk measures.

What should I do when a point is out of control?

Investigate what happened at that moment: a new lot, operator, tool or machine adjustment. If the cause is found and removed, the point can be left out of the limit calculation. Do not adjust the machine for every point inside the limits: that adds variation.

How many subgroups do I need to set control limits?

Usually 20 to 25 subgroups collected while the process runs normally. With fewer, the limits are unreliable and should be revisited when more data comes in.