StatFAS · Run Chart Calculator

Run Chart Explained: Rules, Interpretation and How to Make One in SPSS, R and Python

By the StatFAS team · Published 2026-11-07 · 7 min read

A run chart plots data in time order around the median to reveal shifts, trends and unusual patterns. This guide explains what a run chart is, when a run chart is the right tool, the rules that separate signal from noise, and how to build a run chart in SPSS, R, Python or free online.

Build a run chart online
Paste time-ordered values and get a run chart with runs test, Anhøj rules, trend test and APA 7 text.
Open the free run chart calculator

What is a run chart?

A run chart is a line graph of measurements in the order they were collected, with a horizontal median line as the centre. A run is a sequence of consecutive points on the same side of the median. Because random data cross the median about as often as chance allows, a run chart with too few or too many runs signals that something non-random is happening, such as a shift after an intervention or a drifting process.

When should you use a run chart?

  • Quality improvement and healthcare. Track infection rates, waiting times or medication errors before and after a change.
  • Process monitoring with few data points. A run chart works from about 10 to 12 observations, whereas a control chart prefers 20 or more.
  • Repeated measurements in laboratory work, clinical follow-up or field trials.
  • As the first look at any time series before selecting a model.
  • When limits are unnecessary. The run chart needs no standard deviation, only the median and a few counting rules.

Why choose a run chart instead of a control chart?

A run chart is simple, robust to outliers because the median is used, and quick to explain to a clinical or management audience. A control chart adds control limits and detects single extreme points more strongly, but needs more data and stricter assumptions. Many improvement teams start with a run chart and move to a control chart once the process is stable and the data series is long.

How to interpret a run chart

Rule or testSignal of non-random variation
Shift (Anhøj longest run)Longest run above or below the median exceeds round(log2(n) + 3), where n counts points not on the median
Too few crossingsThe median line is crossed fewer times than the lower 5% limit of a binomial distribution
Wald–Wolfowitz runs testp < .05 for the observed number of runs versus the number expected by chance
Mann–Kendall trend testp < .05 indicates a monotonic upward or downward trend

Points that fall exactly on the median are ignored when counting runs. A signal means the data are unlikely to be random variation, not that the cause is known: annotate the run chart with interventions and holidays. Too many crossings (an oscillating saw-tooth) also signals non-random variation, often from over-adjustment or alternating measurement methods. Autocorrelated or seasonal data can produce false signals, so consider the context before acting.

Common mistakes with a run chart

  • Using fewer than 10 useful data points.
  • Placing data points out of time order.
  • Counting points on the median as part of a run.
  • Recomputing the median after an intervention without stating the change.
  • Treating a lack of signals as proof that the process is good; a run chart shows stability, not quality.

How to report a run chart in APA 7

Example: A run chart with the median (Mdn = 50.27) as the centre line was constructed from 30 observations (Figure 1). The Wald–Wolfowitz runs test did not indicate non-random variation, Z = −0.37, p = .710. The longest run was 4 (threshold 8) and there were 14 crossings (lower limit 10).

How to make a run chart in SPSS, R and Python

SPSS

  1. Choose Graphs → Legacy Dialogs → Line → Simple and select Values of individual cases, or use Analyze → Forecasting → Sequence Charts.
  2. Move the variable into Variable and the time column into Time Axis Labels.
  3. Double-click the chart, open Options → Y Axis Reference Line and add the median as the reference line.
  4. For the runs test choose Analyze → Nonparametric Tests → Legacy Dialogs → Runs, move the variable and tick Median as the cut point.
SPSS syntax
GRAPH /LINE(SIMPLE)=MEAN(value) BY week.
NPAR TESTS /RUNS(MEDIAN)=value.

R

R
plot(y, type = "o", pch = 16)
abline(h = median(y), lty = 2)
randtests::runs.test(y)

Python

Python
import matplotlib.pyplot as plt, numpy as np
plt.plot(y, marker="o"); plt.axhline(np.median(y), ls="--")
plt.show()

Complete scripts are in the run chart tutorial.

The easy way: run chart on StatFAS.com

The free run chart calculator draws the run chart, marks points on the median, and reports the Wald–Wolfowitz runs test, Anhøj longest-run and crossing rules, Mann–Kendall trend and Sen’s slope with an APA 7 write-up. Colours, fonts, line widths and labels are editable, and signed-in visitors can download one Word report.

Build a run chart online
Paste time-ordered values and get a run chart with runs test, Anhøj rules, trend test and APA 7 text.
Open the free run chart calculator

Frequently asked questions about the run chart

What is a run chart used for?

A run chart shows whether a process changes over time by plotting data in order around the median, and flags shifts, trends and unusual patterns.

How many data points does a run chart need?

At least 10 to 12 useful points; 20 to 25 points make the rules more reliable.

What is the difference between a run chart and a control chart?

A run chart uses the median and counting rules, while a control chart adds statistical control limits based on variation and needs more data.

What is a shift in a run chart?

A shift is an unusually long run of consecutive points on one side of the median, longer than round(log2(n) + 3).

Why are points on the median ignored?

Points on the median belong to neither side, so run counting skips them.