MECHOWL QUALITY ANALYSIS AI
p chart and np chart maker: control limits for proportion and number defective
Paste the number inspected and the number defective of each subgroup to get the p chart (proportion defective) or the np chart (number defective) with its control limits and out-of-control signals. The p chart works when the number inspected differs.
Last updated
Your data is not sent. Everything is computed in your browser
Data
Column names in the first row. Tabs or commas, full-width digits, thousands separators and blanks are read.
Read 25 rows and 3 columns.
More settings (Subgroups for the limits, Chart title, Period, Stratum)
Empty: all subgroups.
Empty: the name of the type of chart.
e.g. 1–31 Oct 2026. Written on the chart and the report.
Empty: all rows. A value: only the rows with that value.
Judgement rules
By default, the page uses the eight tests shown as examples in JIS Z 9020-2 annex B (the Western Electric rules, with the point counts of Nelson (1984)). With “Set of tests” you can switch to the examples in figure 3 of the standard (four). Switch tests on or off, or change their numbers, to match your company's or industry's rules; changes are written in the report.
By default the eight tests of annex B. With the examples of figure 3, the switches and numbers below are not used: points are marked for ① a point beyond a control limit, ② 7 points in a row on one side and ③ 7 points in a row increasing or decreasing.
Source of the default: JIS Z 9020-2:2025
Result
UCL 4.14 %: Out-of-control signals (1 subgroups)
Result of the sample data
Out-of-control signals (1 subgroups)
Tests used: 1, 2, 3, 4, 5, 6, 7, 8 (from the eight tests shown as examples in JIS Z 9020-2 annex B (the Western Electric rules)). A signal is a prompt to check the state of the process, not a pass or fail decision.
- Upper control limit (last subgroup) UCL
- 4.14 %
- Lower control limit (last subgroup) LCL
- 0.20 %
About the data
- The sample size differs between subgroups, so the control limits change from subgroup to subgroup (the stepped lines on the chart).
- Where the lower control limit would be 0 or below, no lower limit is drawn.
How to read it
What the chart shows
- Out-of-control signals at subgroups 11/18. The tests that marked them: Test 1 (beyond a control limit); Test 5 (2 of 3 beyond 2σ).
Common misreadings
- Control limits are not specification limits. A point can be inside the control limits and outside the specification, and the other way round.
- Control limits computed with the signalling points included are wider. Remove the subgroups whose cause you have found and compute the limits again (“Subgroups for the limits”).
Next steps
- Check the records for a change in the 4Ms (man, machine, material, method) at the dates and times of the marked subgroups.
Numbers
| Number of subgroups k | 25 |
|---|---|
| Average proportion defective p̄ | 2.17 % |
| Center line CL | 2.17 % |
| Upper control limit (last subgroup) UCL | 4.14 % |
| Lower control limit (last subgroup) LCL | 0.20 % |
| Subgroups with out-of-control signals | 1 |
Calculation steps
- Average proportion defective
p̄ = Σ defectives / Σ inspected278 / 12820 = 2.17 % - Control limits
UCL, LCL = p̄ ± 3√(p̄(1 − p̄)/nᵢ) (by subgroup; no LCL at or below 0)n = 492 (last subgroup): 2.17 % ± 3 × 0.00657 - Tests
The tests are applied to the standardised points zᵢ = (xᵢ − center line) / σᵢσ (last subgroup) = 0.00657
Values, control limits and signals by subgroup
| Subgroup | Defectives | Inspected | Proportion defective | UCL | LCL | Tests met |
|---|---|---|---|---|---|---|
| 11/01 | 8 | 559 | 1.43 % | 4.02 % | 0.32 % | |
| 11/02 | 14 | 556 | 2.52 % | 4.02 % | 0.32 % | |
| 11/03 | 9 | 398 | 2.26 % | 4.36 % | — | |
| 11/04 | 10 | 521 | 1.92 % | 4.08 % | 0.25 % | |
| 11/05 | 7 | 415 | 1.69 % | 4.31 % | 0.02 % | |
| 11/06 | 7 | 602 | 1.16 % | 3.95 % | 0.39 % | |
| 11/07 | 10 | 544 | 1.84 % | 4.04 % | 0.30 % | |
| 11/08 | 9 | 489 | 1.84 % | 4.14 % | 0.19 % | |
| 11/09 | 8 | 560 | 1.43 % | 4.01 % | 0.32 % | |
| 11/10 | 14 | 586 | 2.39 % | 3.97 % | 0.36 % | |
| 11/11 | 12 | 416 | 2.88 % | 4.31 % | 0.03 % | |
| 11/12 | 11 | 422 | 2.61 % | 4.30 % | 0.04 % | |
| 11/13 | 4 | 602 | 0.66 % | 3.95 % | 0.39 % | |
| 11/14 | 14 | 548 | 2.55 % | 4.04 % | 0.30 % | |
| 11/15 | 10 | 441 | 2.27 % | 4.25 % | 0.09 % | |
| 11/16 | 16 | 608 | 2.63 % | 3.94 % | 0.40 % | |
| 11/17 | 19 | 481 | 3.95 % | 4.16 % | 0.18 % | |
| ▲ 11/18 | 23 | 538 | 4.28 % | 4.05 % | 0.28 % | 1,5 |
| 11/19 | 6 | 430 | 1.40 % | 4.28 % | 0.06 % | |
| 11/20 | 15 | 561 | 2.67 % | 4.01 % | 0.32 % | |
| 11/21 | 4 | 386 | 1.04 % | 4.39 % | — | |
| 11/22 | 11 | 563 | 1.95 % | 4.01 % | 0.33 % | |
| 11/23 | 19 | 570 | 3.33 % | 4.00 % | 0.34 % | |
| 11/24 | 9 | 532 | 1.69 % | 4.06 % | 0.27 % | |
| 11/25 | 9 | 492 | 1.83 % | 4.14 % | 0.20 % |
Tests used (the eight tests shown as examples in JIS Z 9020-2 annex B (the Western Electric rules))
| Test | Description | Used |
|---|---|---|
| 1 | 1 point more than 3σ from the center line (beyond a control limit) | ○ |
| 2 | 9 points in a row on the same side of the center line | ○ |
| 3 | 6 points in a row steadily increasing or decreasing | ○ |
| 4 | 14 points in a row alternating up and down | ○ |
| 5 | 2 out of 3 points in a row more than 2σ from the center line, on the same side | ○ |
| 6 | 4 out of 5 points in a row more than 1σ from the center line, on the same side | ○ |
| 7 | 15 points in a row within 1σ of the center line | ○ |
| 8 | 8 points in a row more than 1σ from the center line, on either side | ○ |
The results are reference values based on the data you entered and the formulas and criteria shown. They are not a quality guarantee or a pass/fail decision. The final decision rests with you.
References
- ISO 7870-2:2023 Control charts — Part 2: Shewhart control charts · ISO
- D. C. Montgomery, Introduction to Statistical Quality Control, 8th ed., 2019 · Wiley
- The Shewhart Control Chart—Tests for Special Causes · Journal of Quality Technology 16(4), 237–239 (L. S. Nelson, 1984)
- NIST/SEMATECH e-Handbook of Statistical Methods, 6.3.3 What are Attributes Control Charts? · NIST · Open
- NIST/SEMATECH e-Handbook of Statistical Methods, 6.3.3.2 Proportions Control Charts · NIST · Open
- JIS Z 9020-2:2025 Control charts — Part 2: Shewhart control charts (in Japanese) · Japanese Standards Association (JSA)
Standards are shown by number and title only.
p and np charts explained
A p chart plots the proportion defective p of each subgroup (a day, a lot) in time order and compares it with the center line and the control limits, to show whether something unusual has changed in how defectives occur. It works when the number inspected differs between subgroups; the control limits then change from subgroup to subgroup. An np chart plots the number defective itself, when the number inspected is the same.
p and np charts by hand: step by step
- Collect the number inspected n and the number defective d for 20 to 25 subgroups or more (days, lots and the like).
- Compute the average proportion defective p̄ = Σd / Σn.
- Compute the control limits: p̄ ± 3√(p̄(1 − p̄)/n) for the p chart, np̄ ± 3√(np̄(1 − p̄)) for the np chart. When the lower limit is 0 or below, no lower limit is drawn.
- Plot the points in time order, look for points beyond the control limits or meeting a test, and find what changed in the 4Ms at that time.
Worked examples
Example 1: p chart, 4 subgroups with different numbers inspected
Inspected Defectives 100 2 200 6 100 1 200 3
Settings: Type of chart = p chart (proportion defective)
p̄ = 12/600 = 0.02. n = 100: σ = √(0.02 × 0.98 / 100) = 0.014 → UCL = 0.02 + 0.042 = 0.062; the LCL is negative, so there is none. n = 200: σ = 0.0098995 → UCL = 0.049698.
Example 2: np chart, 4 subgroups of 50 inspected
Inspected Defectives 50 1 50 3 50 2 50 2
Settings: Type of chart = np chart (number defective)
p̄ = 8/200 = 0.04, CL = 50 × 0.04 = 2. σ = √(50 × 0.04 × 0.96) = 1.38564 → UCL = 2 + 4.15692 = 6.1569; the LCL is negative, so there is none.
Example 3: np chart with different numbers inspected (data that does not meet the conditions)
Inspected Defectives 50 1 60 3
Settings: Type of chart = np chart (number defective)
The np chart is only for the same number inspected. The page points to the p chart.
Example 4: More defectives than inspected (input error)
Inspected Defectives 10 11 10 1
Settings: Type of chart = p chart (proportion defective)
On row 1, 11 defectives out of 10 inspected cannot be.
Example 5: p chart with a positive LCL (n = 1000, p̄ = 0.05)
Inspected Defectives 1000 50 1000 50
Settings: Type of chart = p chart (proportion defective)
p̄ = 0.05, σ = √(0.05 × 0.95 / 1000) = 0.0068920 → UCL = 0.070676, LCL = 0.029324 (positive, so it is drawn).
Common mistakes
- Using the np chart when the number inspected differs (days with more inspected seem to have more defectives: use the p chart).
- Computing the average proportion defective as the average of the subgroups’ proportions (compute it as Σd / Σn).
FAQ
- Why do the control limits differ from subgroup to subgroup?
- The control limits of the p chart depend on the number inspected n: the larger n, the narrower the limits. The chart shows them as stepped lines by subgroup.
- Is my data sent anywhere?
- No. The calculations and the chart are made in your browser only.
Scope
Control charts of the number of defective items in each subgroup (assuming the binomial distribution). The control limits are 3σ.
Not covered by this tool:
- The number of defects within one product (use the c and u charts).
- Corrections for processes with a very small proportion defective (g charts and the like).
Excel template: p and np charts
A template with the column names and sample values only (no formulas). Enter your values, then copy the range and paste it into the box above.