Lab-Tacular

Levey-Jennings chart & Westgard rules

Paste your control measurements and get the statistics, control limits, chart and rule verdict in one pass.

This is a quality control tool for instruments and reagents. It cannot be used to interpret or diagnose patient results.

More values are needed before this can be judged

Paste some values and the verdict will appear here

Paste your data

Section A

A new lot needs a new baseline, so each lot keeps its own running total.

Baseline (mean & SD)

Section B
Baseline

The control limits come from the data you pasted. This is how a baseline is set for a new lot, and it means an outlier in the data widens the limits along with it. If your laboratory already has an established baseline, use 'Enter it myself'.

Control limits

A standard deviation needs at least two values.

Levey-Jennings chart

Section C
+3SD+2SD+1SD−1SD−2SD−3SD

Paste your data and the measurements will be plotted on these lines.

Rules applied

Preset
Treat 1-2s asTreat 1-2s as

Statistics & running total

Section E

This period

n
0
Mean
SD
CV

Running total

n
Mean
SD
CV

Carried forward

n
0
Σx
0.00
Σx²
0.00

These three numbers are all the next period needs. The measurements themselves are never stored.

This browser will not let the running total be saved. The calculations still work normally.

How to use it

  1. Name the analyte, its unit and the control level. Add the lot number if you have one — a new lot keeps its own running total.
  2. Copy this period's QC values out of your spreadsheet and paste them in. A date column is fine, and so are bare values. The reading happens as you paste.
  3. Read the recognition notice. Skipped rows and unreadable entries are all listed, so nothing drops out quietly.
  4. Choose the baseline. Use 'Enter it myself' if your laboratory has an established mean and SD, 'Use the saved running total' if you have been keeping one here, and 'Calculate from this data' when you are establishing a new lot.
  5. Read the chart for the shape of the month, then the verdict for which rule was broken and why. [Show on the chart] points at the measurement in question.
  6. Switch rules on or off to match your laboratory's procedure. The setting is remembered in this browser.
  7. To close the period, press [Add this period to the running total]. Next month can then be judged against everything before it.

Formulas and cautions

These are all the calculations this tool performs. Every number on the screen comes from one of them.

Statistics and control limits

Mean
x̄ = Σx ÷ n
Sample standard deviation (n−1)
s = √[ Σ(xᵢ − x̄)² ÷ (n − 1) ]
Coefficient of variation
CV(%) = s ÷ x̄ × 100
Control limits
μ ± k × σ (k = 1, 2, 3)
Standardised value
zᵢ = (xᵢ − μ) ÷ σ

The six Westgard rules

RuleConditionSeverity
1-2s2 < |z| ≤ 3 (while 1-3s is on)a warning
1-3s|z| > 3a rejection
2-2stwo consecutive points, same sign, both |z| > 2a rejection
R-4s|z(i) − z(i−1)| > 4a rejection
4-1sfour consecutive points all z > 1 or all z < −1a rejection
10xten consecutive points all z > 0 or all z < 0a rejection

Every comparison is a strict greater-than. A point sitting at exactly 2.000 SD is not a 1-2s violation. The whole series is judged rather than only its last point, and when one point breaks several rules all of them are reported.

The running total

A running total is carried on three numbers alone, without keeping any measurement. These are exactly the three numbers the official Westgard tool asks you to copy out by hand.

Carry forward
add n, Σx and Σx² together
Cumulative mean
x̄ = Σx ÷ n
Cumulative SD
s = √[ ( Σx² − (Σx)² ÷ n ) ÷ (n − 1) ]

In practice

  • The standard deviation is the sample SD (n−1). A month of control measurements is a sample of every measurement the method could produce, not the whole of it; the population SD (n) would read smaller than the truth.
  • Rules are judged against the baseline you chose, not against the data on screen. With 'Enter it myself' or a saved running total, the centre of the chart and the mean of the data are different numbers — and the gap between them is itself worth reading.
  • Control limits are usually established from 20 or more days. A baseline calculated from fewer should be treated as provisional.
  • A new lot needs a new baseline. This tool puts the lot into the item key so the running total separates itself automatically.
  • Displayed statistics use the two-pass formula and running totals use the one-pass form, because a running total has no measurements left to pass over. That is also why Σx and Σx² are stored without rounding.
  • R-4s properly compares two levels within one run. With a single level it is applied to consecutive points instead — common practice, but not identical to the original definition.
  • A 1-2s turns up about once in twenty runs even when nothing is wrong. Failing a run on that rule alone produces a great many false alarms.

What this tool is for

This is a quality control tool for instruments, reagents and measurement methods. It is not a tool for interpreting patient results or reaching a diagnosis. That distinction is a design constraint of the product, not a disclaimer.

What it does

  • Runs statistics on measurements of control material whose value is known
  • Judges whether the instrument and reagent are working within their limits
  • Reports the precision of the measuring system (SD, CV)
  • Applies the Westgard rules to decide statistical control status
  • Supports a laboratory's internal quality control work

What it does not do

  • Accept or process patient results
  • Say anything about a patient's condition or disease
  • Decide reference ranges or what counts as normal
  • Recommend treatment, prescription or further testing
  • Make clinical decisions

What it cannot replace

  • Your quality control procedure — which rules to apply, and what to do when a run fails, is for the laboratory to decide. This tool only calculates.
  • Your official QC records — records required for accreditation or by law belong in the LIS or the laboratory's own system. Browser storage is not a record-keeping system.
  • Accreditation requirements — nothing here guarantees that ISO 15189 or any equivalent standard is satisfied.
  • Professional judgement — finding the cause of a violation and acting on it is a person's job. The 'check the following' lists are a starting point, nothing more.

FAQs