u Chart Calculator — Defects per Unit, Variable Inspection Size

Defects per unit with the control limits recomputed for every inspection size and drawn as the staircase they actually are — because a shift that signals on a twenty-panel subgroup genuinely should not signal on an eight-panel one, and one flat limit from the average n gets both of those wrong.

Why the limits are a staircase

ū is the total defect count divided by the total number of inspection units, and σ at point i is √(ū/nᵢ). The nᵢ in that denominator is the whole story: a subgroup that covered twenty panels contains twenty panels’ worth of evidence, so its limits are tight, and a subgroup that covered eight is allowed to wander further before anybody should care. The limits therefore step up and down with the inspection size, and this tool always draws them that way.

The wrong version — one flat limit computed from the average n — is the most common mis-implementation of this chart, and the difference is not cosmetic. It makes small subgroups look out of control when they are not, and lets large ones drift past the real limit without flagging. On tidy demonstration data whose sizes barely vary the two pictures are indistinguishable, which is exactly why the mistake survives. There is no option here to draw the flat version.

Data

Paste straight from Excel, Minitab or a CMM export — include the header row and the columns are matched by name, in any order.

#Sample(opt)DefectsUnits inspected(opt)
1
2
3
4

0 rows of data

Loading the calculation engine…

Enter data on the left to chart it

SVG is vector — it stays sharp at any size in a report. PNG 4× is roughly 600 dpi at figure width. Every export carries the estimator, the constants and the rule set drawn inside the figure, so the file is readable on its own.

Downloads carry a small “made with spcplot.com” credit along the bottom edge. The chart on screen is never watermarked, and the credit is a credit rather than a licence restriction — the figures are yours to publish either way. A Pro or Lifetime licence removes it.

Options

This plot has no adjustable options yet.

Your measurements are processed entirely in this browser tab. Nothing you type here is uploaded, so confidential production data stays confidential.

What an inspection unit is, and why you get to choose it

The inspection unit is whatever you decided one unit of opportunity is: one panel, one square metre, one thousand device-days, one vehicle. The count column is defects found; the size column is how many of those units the sample covered.

If your data is recorded in the raw quantity rather than in units — 2,500 device-days rather than 2.5 thousand-device-days — set "raw quantity per inspection unit" to 1000 and paste the raw numbers. It rescales ū and the limits together, so not a single point changes from in to out of control; only the units on the axis change. The figure prints which unit produced the numbers, because "1.4 defects per unit" means nothing without it.

Where the lower limit goes, and what it takes with it

A defect rate cannot be negative, so wherever ū − 3√(ū/nᵢ) falls below zero the lower limit is clamped away and is simply not drawn at that point. On a chart with varying sizes that happens to some points and not others, so the lower staircase has gaps in it. That is the chart being accurate, not the renderer failing.

It has a consequence people miss. With no lower limit, the −1σ and −2σ zones below the centre line do not exist either, so the Nelson tests that work in those zones — 5, 6, 7 and 8 — cannot fire, for a reason that has nothing to do with the process. Reporting them as passed would be a false reassurance, so this tool suppresses them and prints which ones it suppressed.

The Poisson assumption, stated plainly

A u chart derives σ from the centre line rather than estimating it from your data, which is what makes it possible to chart counts at all — and what makes it fragile. If defects arrive in clusters rather than independently, the counts are overdispersed, √(ū/nᵢ) is too small, and every limit on the chart is too narrow.

This tool computes the χ² index of dispersion and prints it when it fails, along with the awkward fact that two very different things produce the same failure: genuine overdispersion, which means the limits should be wider, and a real shift somewhere in the data, which means the chart is working and the limits should be frozen on a stable stretch instead. Set a baseline to tell them apart — the example that loads by default is exactly this case.

Separately, the 3σ limits are a normal approximation, which needs an expected count of at least five in a subgroup. When the smallest subgroup falls below that, the figure says so.

Common questions

Should I use a u chart or a c chart?
Use a c chart when every sample covered the same area of opportunity and a u chart when it did not. If you are not sure, use the u chart with the real inspection sizes: when they turn out to be equal it produces exactly the c chart, and it says so on the figure.
Why do my control limits move up and down?
Because σ depends on the inspection size: σᵢ = √(ū/nᵢ). A smaller subgroup carries less evidence and gets a wider limit. Limits that do not move on data with varying subgroup sizes are wrong, not tidy.
Why does the lower limit disappear at some points and not others?
Because at those inspection sizes ū − 3√(ū/nᵢ) is negative, and a defect rate cannot be. The limit is clamped away rather than drawn at zero, and the run rules that need the zones below the centre line are suppressed and named.
Can I use non-integer inspection sizes?
Yes. 2.5 inspection units is a perfectly ordinary entry when the unit is a thousand device-days and you inspected 2,500 of them. The defect count has to be a whole count of things you found; the size does not.
Is my data uploaded anywhere?
No. The whole calculation runs as JavaScript in this browser tab, and nothing on this site accepts a measurement — the only server code here takes a payment. That is why the tool is usable on data you are contractually barred from putting in a cloud service.