A p-chart is a control chart that tracks the proportion of defective units in each sample over time, plotting the fraction defective against a center line and control limits. Because it uses a proportion, a p-chart handles samples of different sizes, with limits that tighten as the sample grows and widen as it shrinks.

Most control charts people picture are for measurements, a dimension, a weight, a temperature. The p-chart is for the other kind of data: pass or fail, good or defective, the counts you get from a go/no-go check, a visual sort, or a functional test. It answers one question over time: is the fraction of bad units stable, or is the process getting worse? This guide covers when a p-chart is the right tool, how its control limits are calculated, why those limits step in and out with each subgroup, and how it compares to the other attribute charts.

What is a p-chart?

A p-chart is an attribute control chart for the proportion defective. Each point is one sample: you inspect a group of units, count how many are defective, and divide by how many you inspected. That fraction, p, is the point you plot. String the points together over time and you can see whether the process defect rate is holding steady around its average or drifting, jumping, or trending, which is exactly what any control chart is built to reveal.

The word attribute is the key. A p-chart does not care how far out of tolerance a part was, only whether it counted as defective. That makes it the natural home for data that is a yes/no judgment rather than a reading on a scale, the difference at the heart of attribute versus variable inspection. When your inspection produces counts of defective units rather than measured values, a p-chart is usually where those counts belong.

A p-chart with stepped control limits that vary by subgroup sizeOn a p-chart, the limits step with the sample sizeproportion defective (p)p-barUCLLCLSIGNALbig sample: tight limitssmall sample: wide limits
Each point is one subgroup proportion. The center line is the average defect rate. The control limits are not straight lines: they step inward when a sample is large and outward when it is small, because a bigger sample gives a more certain estimate of p.

When do you use a p-chart?

Use a p-chart when three things are true: your data is pass/fail, you are tracking the proportion of defective units, and your sample size varies from subgroup to subgroup. The last one is what makes the p-chart shine. If you inspect every unit produced in an hour, and production volume changes hour to hour, your sample size is never the same twice, and a proportion is the only fair way to compare a bad hour to a slow one. Fifteen defects out of 300 is a very different story from fifteen out of 3,000, and only the fraction tells you which.

You would not use a p-chart for measured data, that belongs on a variables chart, and you would not use it to count multiple defects on a single unit, that is a c-chart or u-chart. The p-chart counts defective units, one per unit, not defects. It also gets shaky when the defect rate is very low and the sample is small, because you can go long stretches with zero defectives and the chart tells you almost nothing. In that case you widen the sample or switch to a different measure of quality entirely, such as tracking defective parts per million.

How do you calculate p-chart control limits?

The center line is the overall average proportion defective, p-bar, which is the total defectives across all samples divided by the total units inspected. The control limits sit three standard deviations above and below that center line, and the standard deviation of a proportion depends on the sample size. Written out, the limits for a subgroup of size n are:

UCL = p-bar + 3 √( p-bar (1 - p-bar) / n )
LCL = p-bar - 3 √( p-bar (1 - p-bar) / n )

The p-bar (1 - p-bar) term comes from the binomial distribution that governs pass/fail counts, and dividing by n is what ties the limit width to the sample size. When the calculated LCL comes out negative, which happens whenever the defect rate is low, you set it to zero, because a proportion cannot be less than zero. These are control limits, computed from the process itself; they are not the customer tolerance, and confusing the two is the most common way people misread any chart, which is why control limits versus specification limits is worth getting straight before you plot a single point.

Why do the control limits vary per subgroup?

Because the n is inside the formula. Look again at the limit equation: the sample size n sits under the square root. A large sample gives a more precise estimate of the true proportion, so the limits pull in tight around the center line. A small sample is noisier, so the limits spread wide to avoid crying wolf. The result is the stair-step look of a p-chart with variable sample sizes: the limits are not two straight lines but a staircase that recalculates for every point.

This is a feature, not a nuisance. It means the chart is fair. A proportion from a huge sample is held to a stricter standard because you have more evidence, while the same proportion from a tiny sample is given more room because it could easily be luck. If you ignored this and drew one average limit for all points, you would over-react to small samples and under-react to big ones, exactly backwards. When sample sizes stay within roughly plus or minus 25 percent of the average, some teams simplify by using the average sample size for one set of limits; when they swing wider than that, you compute the limits point by point.

Choosing among the attribute control charts: p, np, u, and cWhich attribute chart? Two questions decide itCounting what?defective units or defects?defective UNITSDEFECTS on a unitsample size varies?sample size varies?P-CHARTvariesnp-chartconstantu-chartvariesc-chartconstant
Two questions pick the attribute chart. Are you counting defective units or defects on a unit, and does the sample size vary? The p-chart is the answer for defective units in samples of changing size.

How do you build a p-chart step by step?

Building a p-chart is a fixed sequence. Follow it in order and the chart comes out honest; skip the baseline step and you get limits that just memorize your bad history.

  1. Define what defective means. Write the pass/fail rule so every inspector calls a unit the same way. A drifting definition makes the chart track opinions, not the process.
  2. Collect the subgroups. For each time period, record the number of units inspected (n) and the number defective. Gather at least 20 to 25 subgroups before you set limits.
  3. Compute each proportion. For every subgroup, p equals the number defective divided by n. This is the value you will plot.
  4. Compute the center line. p-bar is the total defectives across all subgroups divided by the total units inspected, not the average of the individual p values.
  5. Compute the control limits for each subgroup. Apply the UCL and LCL formula using that subgroup own n, so the limits step with the sample size. Set any negative LCL to zero.
  6. Plot the chart. Draw p-bar, the stepped limits, and the subgroup proportions in time order.
  7. Check for out-of-control signals. Look for any point beyond a limit and for the nonrandom patterns, runs and trends, that say the process shifted even without a breakout point.
  8. Attach a reaction. Pair the chart with an out-of-control action plan so a signal produces a defined response instead of a shrug.

P-chart vs np-chart: when do you use which?

They track the same pass/fail data; they differ in what they plot and what they demand of your sample. A p-chart plots the proportion defective and accepts samples of any size. An np-chart plots the raw number of defective units and requires a constant sample size, because a count of defectives only compares fairly across time if every sample was the same size. Choose by asking two things: does my sample size vary, and do I want to read a rate or a count?

QuestionP-chartnp-chart
What each point plotsProportion defective (a fraction)Number of defective units (a count)
Sample sizeCan vary from subgroup to subgroupMust be constant
Control limitsRecalculate per subgroup, steppedConstant, straight lines
Easiest to read on the floorA rate you can compare across sizesA plain count when volume is fixed
Best whenVolume changes shift to shiftYou pull the same lot size every time
The p-chart is the flexible one: variable sample size, plotted as a rate. The np-chart is the simpler one when your sample size never changes and you want to watch a raw count.

In practice, if you can hold the sample size constant, an np-chart is easier for operators to read because a count needs no mental math. If you cannot, a p-chart is the honest choice. Both live inside the same discipline of statistical process control and both need the same thing to be worth plotting: a defined reaction when they signal.

By the numbers: the statistics behind a p-chart

The p-chart is a standardized method with a defined statistical basis, not a house rule. The NIST/SEMATECH Engineering Statistics Handbook states that the underlying statistical principles for a control chart for proportion nonconforming are based on the binomial distribution, which is exactly the p-bar (1 - p-bar) term in the limit formula (NIST/SEMATECH, Proportions Control Charts). ASQ documents the control chart more broadly as the tool for studying how a process changes over time against limits that separate common-cause variation from a real signal (ASQ, What is a Control Chart?). The three-sigma limits are a deliberate balance: wide enough to ignore normal noise, tight enough to catch a real shift in the defect rate.

What are the most common p-chart mistakes?

The most common is drawing one set of straight control limits when the sample size varies. That throws away the whole advantage of the p-chart and produces false signals on small samples and missed signals on large ones. Right behind it is a fuzzy definition of defective, so the chart tracks how strict today inspector is rather than how the process behaved.

Other frequent errors: setting limits from too few subgroups, so the baseline is unstable; forgetting to floor a negative LCL at zero; using a p-chart for a very low defect rate on a small sample, where you get mostly zeros and no useful signal; and, the classic, treating the control limits as the specification. A point inside the control limits means the process is stable, not that the parts meet the customer requirement. Those are two different questions, and the p-chart only answers the first.

How do you keep a p-chart working on the floor?

A p-chart earns its place only when the counts feeding it are captured cleanly and the signal reaches someone who can act. The usual failure is not the math; it is the plumbing. When inspectors tally defectives on a paper sheet and someone keys them into a spreadsheet at end of shift, the chart is always a day behind the process it is supposed to control, and the stepped limits get quietly replaced with one flat line because recomputing per subgroup by hand is tedious.

Capturing the count at the point of inspection fixes both problems. When the sample size and defect count are recorded at the station as the units are checked, the proportion and its correct per-subgroup limits compute themselves, and a point beyond a limit surfaces during the shift that made it, not the next morning. That is the live capture Harmony puts at the point of work through station-level data capture so a p-chart stays current and its signals trigger a real reaction. CLS made exactly that move, from defect counts found the next day to a chart the floor could act on while the run was still going. No rip-and-replace.