operations-quality · quality-six-sigma · statistical-process-control

Control Chart Calculator

Computes X-bar and R control limits from your subgroups using derived control-chart constants, and flags out-of-control points. Use it to set up a control chart from sample data.

Last updated
Dataset Lab

Calculator overview

Inputs and outputs

This summary comes from the calculator's published input and output contract.

Inputs

Subgroup Size
About this input

The number of measurements in each subgroup, from 2 to 5. It selects the control chart constants used to turn the average range into control limits.

Unit 2 to 5 Default 5 Range 2 to 5
Upper Specification Limit
About this input

The highest value the product may have and still conform, in the measured units. Used with the estimated sigma to report process capability, not for the control limits.

Unit units Default 10.4
Lower Specification Limit
About this input

The lowest value the product may have and still conform, in the measured units. Used for capability, not for the control limits.

Unit units Default 9.6
Subgroup Measurements
About this input

One row per subgroup, holding the individual measurements taken at that sampling time. The tool computes each subgroup's mean and range, then builds the X-bar and R control limits from the set.

Default 25 rows
ColumnRange or allowed values
Subgroup Not declared
x1 Not declared
x2 Not declared
x3 Not declared
x4 Not declared
x5 Not declared

Outputs

Points Out Of Control Averages
About this output

How many subgroup means fall outside the averages control limits, in count. More than zero means the process average is not stable.

Unit count
Points Out Of Control Ranges
About this output

How many subgroup ranges fall outside the range control limits, in count. More than zero means the within-subgroup spread is not stable.

Unit count
Minimum Process Capability Index
About this output

Cpk, the capability index accounting for how far the process is off centre, as an index. Values above 1.33 are commonly treated as capable.

Unit index
Model Status
About this output

The overall check on your entries, shown above the results. It reads OK when the inputs are usable, NOT VALID with a reason when an entry makes the model meaningless, or CHECK with a reason when a result is valid but worth a second look. Read it before you trust the numbers below.

No unit declared
Process Capability Index
About this output

Cp, the specification width divided by six times the estimated sigma, as an index. It assumes the process is centred and is only meaningful once the chart shows control.

Unit index
Upper Control Limit Averages
About this output

The upper control limit for the subgroup averages, in the measured units. A subgroup mean above it signals the process may be out of control.

Unit units
Upper Control Limit Ranges
About this output

The upper control limit for the subgroup ranges, in the measured units. A range above it signals a change in within-subgroup variation.

Unit units
Subgroup Size In Use
About this output

The subgroup size the calculations actually used, in count, after reading the entered data. The declared range is 2 to 5 because the control-chart constants are tabulated to five; confirm it matches the size you intended.

Unit count
Total Parts Per Million Out Of Specification
About this output

The estimated defect rate beyond the two specification limits, in parts per million, from the normal model at the estimated mean and sigma. It is an estimate, not a measured count.

Unit ppm
Control Chart Constant D2
About this output

The d2 bias-correction constant for the subgroup size, derived by integrating the range distribution rather than read from a published table. It converts the average range into an estimate of sigma.

Unit constant
Control Chart Constant D3
About this output

The D3 constant for the subgroup size, which sets the lower control limit for the ranges. It is zero for small subgroups.

Unit constant
Average Range
About this output

The average of the subgroup ranges, in the measured units, taken over the COMPLETE subgroups only: a row with fewer readings than the subgroup size is refused rather than averaged, because the d2 constant assumes exactly n readings. It drives both the range control limits and the estimate of sigma.

Unit units
Control Chart Constant A2
About this output

The A2 constant for the subgroup size, which sets the width of the averages control limits from the average range.

Unit constant
Control Chart Constant D4
About this output

The D4 constant for the subgroup size, which sets the upper control limit for the ranges.

Unit constant
Lower Control Limit Averages
About this output

The lower control limit for the subgroup averages, in the measured units. These limits describe the process voice, not the specification.

Unit units
Lower Control Limit Ranges
About this output

The lower control limit for the subgroup ranges, in the measured units. It is zero for small subgroups, where the D3 constant is zero.

Unit units
Estimated Sigma From The Range
About this output

The estimate of the process standard deviation, in the measured units, found as the average range divided by d2. It is a within-subgroup estimate, not the standard deviation of all the readings.

Unit units
Grand Average
About this output

The average of all the subgroup means, in the measured units. It is the centre line of the averages chart.

Unit units

What it is

The Control Chart Calculator sets up X-bar and R charts from measurement data. You enter one row per subgroup, each holding the individual measurements taken at that sampling time, and it computes the centre lines and control limits for both charts, counts any points falling outside them, estimates the process standard deviation from the average range, and reports the capability indices against your specification limits.

Measurements are in whatever units you are working in; the tool carries them through unchanged. Subgroup sizes from 2 to 5 are supported.

Use it to establish control limits from a sample of subgroups and to see whether the process was stable while they were collected. Control limits describe the process; they are not specification limits and the tool keeps the two strictly apart.

Methodology

Purpose and model boundary

This calculator builds X-bar and R control charts from rational subgroups, estimates within-subgroup process variation from the average range, and reports two-sided Cp/Cpk and normal-model out-of-specification PPM against entered specification limits. The range chart is interpreted first because unstable within-subgroup variation invalidates the basis of the X-bar limits and capability estimate.

The workbook applies only the basic point-beyond-a-control-limit signal. It does not test runs, trends, cycles, stratification, mixtures, or other supplementary SPC rules, and it does not substitute specification limits for control limits.

Inputs and units

  • Subgroup size, n is an integer from 2 through 5.
  • Subgroup measurements contains up to 25 rows. Every used row must contain exactly n numeric readings; unused rows remain blank. The subgroup identifier is fixed and not part of the arithmetic.
  • USL and LSL use the same measurement unit as the grid and must satisfy USL > LSL.

Columns beyond the selected subgroup size are not part of that row's subgroup. Inputs and results therefore require one consistent physical unit throughout.

Governing relationships

For complete subgroup i, the workbook computes its mean xbar_i and range R_i = max(x_ij) - min(x_ij). Across all complete subgroups,

  • xbarbar = average(xbar_i);
  • Rbar = average(R_i);
  • UCL_xbar = xbarbar + A2 * Rbar;
  • LCL_xbar = xbarbar - A2 * Rbar;
  • UCL_R = D4 * Rbar;
  • LCL_R = D3 * Rbar;
  • sigma_within = Rbar / d2.

The workbook derives d2 and the range-distribution spread by numerical integration for the selected n; A2 = 3 / (d2 * sqrt(n)), D4 = 1 + 3*d3/d2, and D3 = max(0, 1 - 3*d3/d2).

Capability is calculated from the within-range estimate:

  • Cp = (USL - LSL) / (6 * sigma_within);
  • Cpu = (USL - xbarbar) / (3 * sigma_within);
  • Cpl = (xbarbar - LSL) / (3 * sigma_within);
  • Cpk = min(Cpu, Cpl).

Out-of-specification PPM is the sum of the two normal-tail probabilities beyond LSL and USL using xbarbar and sigma_within.

Calculation sequence

  1. Clamp the workbook subgroup-size selector to the implemented range and count numeric readings in each row.
  2. Reject partial used rows; retain only rows with exactly n values and require at least two complete subgroups.
  3. Calculate each complete row's mean and range, then xbarbar and Rbar.
  4. Select the derived constants for n, calculate X-bar/R limits, and count points outside each pair of limits.
  5. Estimate within sigma from Rbar/d2, calculate capability indices and normal-tail PPM, then evaluate status with range-chart signals before average-chart signals.

Outputs and interpretation

The X-bar centre and limits describe between-subgroup movement of the mean; the R chart describes within-subgroup variation. A point outside a limit is a signal for investigation, not proof of a particular cause. Cp compares specification width with estimated short-term spread and ignores centring. Cpk includes the distance to the nearer specification limit. Capability should be interpreted only after the charts support stability.

Validation and status logic

The workbook evaluates status in this order:

Condition Returned status
Any used row contains fewer than n numeric values NOT VALID: a subgroup row is incomplete; enter exactly the subgroup size in every used row
Fewer than two complete subgroups NOT VALID: at least two complete subgroups are needed
USL <= LSL NOT VALID: the upper specification limit must exceed the lower
Rbar <= 0 NOT VALID: the average range is zero, check the data
Any R-chart point is outside its limits CHECK: the range chart has points out of control; fix that before reading the averages chart
Any X-bar point is outside its limits CHECK: the averages chart has points out of control
Cpk < 1.00 CHECK: Cpk is below 1.00
None of the above OK

This calculator also bounds the subgroup-size control to 2 through 5 and validates grid shape before the workbook call.

Assumptions and limitations

The method assumes rational, independent subgroups of the same size, a stable process, and an approximately normal continuous measurement for the PPM calculation. The range-based sigma estimator is efficient for the small subgroup sizes implemented here but is not a substitute for a study of long-term drift. Only the outside-limit rule is applied; the absence of flagged points does not establish control under other SPC rules. Specification limits are externally defined conformance boundaries and play no role in setting the control limits. A minimum of two subgroups is computationally sufficient but often not sufficient evidence for a production decision.

Restrictions and non-computing states

The workbook supports only the authored subgroup-size range and the outside-limit rule. It does not evaluate supplementary run, trend, zone, or pattern rules. Invalid subgroup grids or invalid specification-limit combinations produce a non-computing state identified by the status message.

Errors and warnings

A rejected entry indicates an invalid control value or invalid grid entry before the model ran. Workbook NOT VALID means the dataset cannot support the X-bar/R calculation. Workbook CHECK means the calculation exists but a control or capability signal needs attention. A calculation-service or network failure is not an out-of-control point.

References

The workbook derives its relations rather than reproducing any table, chart or figure from a specification, standard or agency publication. The control-chart constants are obtained by integrating the distribution of the range for the subgroup size, not read from a published table, and each is reported on the page so the derivation can be checked against any source you trust.

Specification limits are yours to supply and carry no authority from this tool. The capability figures depend entirely on them, and on the assumption that the measurements are normally distributed.

Additional source notes migrated from Methodology

The workbook derives d2, A2, D3, and D4 from the range distribution rather than reproducing a published control-chart table, and uses the standard X-bar/R and Rbar/d2 relationships shown above. The page's References section carries the numerical-method and licensing details.

Frequently asked questions

What is the difference between a control limit and a specification limit?
Control limits are computed from the process data and describe what the process does when nothing unusual is happening. Specification limits are the requirement the product must meet and have nothing to do with the process. A point outside a control limit means something changed and is worth investigating, whether or not the part conforms; a process fully inside its control limits can still produce scrap if its natural spread is wider than the specification. This tool never puts the two on the same chart, and putting them there is the most common way control charting is misused.
Should I read the control charts or the capability indices first?
The charts, always. Capability assumes the process is stable, so `Cp` and `Cpk` computed from an out-of-control process describe nothing repeatable; you would be summarising a mixture of different processes. Check that no points are out of control, then read the indices.
Why is the lower control limit on the range chart zero?
Because the `D3` constant is zero for subgroup sizes up to six. With so few measurements per subgroup, no range is small enough to be statistically surprising, so there is no meaningful lower bound to cross. It becomes non-zero at larger subgroup sizes, which this tool does not cover.
Why is Cpk lower than Cp?
Because `Cp` ignores centring and `Cpk` does not. `Cp` compares the specification width against the process spread as though the process sat exactly in the middle; `Cpk` measures the distance to the nearer specification limit. The gap between them is entirely a measure of off-centring, and closing it is what centring the process would buy. `Cpk` can never exceed `Cp`.
Why does the tool refuse a subgroup row that is partly filled?
Because the control-chart constants assume exactly the subgroup size in every used row. Averaging over a short row would apply the wrong constant to it and silently distort both the limits and the sigma estimate. The tool refuses the row by name rather than returning a number computed from a mismatched constant. Leave a subgroup out entirely, or complete it.
Does a process inside its control limits mean nothing is wrong?
Not necessarily. This tool applies the basic out-of-limit test only. The supplementary run rules (long runs on one side of the centre line, steady trends, alternating patterns, clusters in the outer zones) detect drift while every point is still between the limits, and none of them are applied here. A chart with no out-of-control points can still show an obvious trend to the eye.
This page is provided by LogicCommons for informational purposes only. Results are analysis outputs computed from the inputs you supply and are not engineering advice, a design, or a substitute for review by a licensed professional under the codes adopted where the work is built. Verify all inputs and results independently.

LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.