Skip to main content
v2026.11,858 entries · CC-BY 4.0

Q-Q Plot: What It Is, How It Is Built, and How to Read It

A Q-Q plot compares your data’s quantiles with a reference such as the normal. See it built from eight values, with a patterns table and R, Python and Excel.

Written and maintained by CASRAI Editorial Board

Last updated

A Q-Q plot (quantile-quantile plot) is a graph that compares the quantiles of one set of values with the quantiles of a reference, most often a normal distribution, so you can see at a glance whether the two have the same shape. If the points fall close to a straight reference line, the data behave like the reference; systematic curves away from the line show skew, heavy or light tails, or outliers. This guide shows how the plot is built from eight real numbers, how to read the patterns, and how to produce and report one.

What is a Q-Q plot?

The NIST/SEMATECH e-Handbook defines the q-q plot as a graphical technique for determining whether two data sets come from populations with a common distribution. It plots the quantiles of the first data set against the quantiles of the second, with both axes in the units of their own data sets. A reference line at 45 degrees is drawn, and points should fall approximately along it; the greater the departure from the line, the greater the evidence that the two distributions differ. The handbook notes that the plot can show shifts in location, shifts in scale, changes in symmetry and the presence of outliers.

The version used most often in research is the normal Q-Q plot (also called a normal probability plot): the ordered sample values go on the vertical axis and the values expected from a normal distribution go on the horizontal axis. NIST describes departures from the straight line as departures from normality. For the normal curve behind the reference line, see the normal distribution and its probability plot. For a wider look at the decision, see how to check the normality assumption in research data.

How a Q-Q plot is constructed (worked example)

Take eight task-completion times in minutes (illustrative data): 12, 15, 14, 10, 18, 13, 16, 22. The steps are:

  1. Sort the values from smallest to largest: 10, 12, 13, 14, 15, 16, 18, 22.
  2. Give each value a plotting position p = (i – 0.5) / n, where i is its rank and n = 8. For i = 1, p = 0.5 / 8 = 0.0625; for i = 8, p = 7.5 / 8 = 0.9375.
  3. Convert each p to a theoretical quantile with the standard normal inverse CDF, z = Φ-1(p). For p = 0.0625 this gives z = -1.5341.
  4. Plot each sorted value (vertical) against its z (horizontal).
Rank i Sorted value p = (i – 0.5)/8 Theoretical z Value on reference line
1 10 0.0625 -1.5341 9.26
2 12 0.1875 -0.8871 11.68
3 13 0.3125 -0.4888 13.17
4 14 0.4375 -0.1573 14.41
5 15 0.5625 0.1573 15.59
6 16 0.6875 0.4888 16.83
7 18 0.8125 0.8871 18.32
8 22 0.9375 1.5341 20.74

The reference line here is mean + SD × z. The sample mean is 15 and the sample standard deviation is 3.742, so the line value at z = -1.5341 is 15 + 3.742 × (-1.5341) = 9.26. Most points sit within about 1 minute of the line; the largest value (22) is 1.26 minutes above its line value of 20.74, a mild pull in the upper tail. The correlation between the eight sorted values and their z scores is r = 0.9816 (own computation). Different software uses slightly different plotting positions, so another package can give slightly different coordinates; SciPy, which uses Filliben’s estimate, gives r = 0.9797 for the same data.

How to read a Q-Q plot: patterns table

With the data on the vertical axis and the normal quantiles on the horizontal axis, these are the standard patterns. The directions below were checked against simulated samples of 200 values (own simulation, NumPy seed 2026), standardised and compared with the normal quantiles.

What you see What it usually means
Points hug the line along its whole length The data are consistent with the reference distribution
Both ends curve above the line, forming a U shape Right (positive) skew, a long upper tail
Both ends curve below the line, forming an arch Left (negative) skew, a long lower tail
Lower end below the line and upper end above it, an S shape Heavy tails: more extreme values than a normal distribution produces
Lower end above the line and upper end below it, a flat S shape Light tails: fewer extreme values than a normal distribution produces
One or two points far from an otherwise straight line Outliers; check the records before doing anything else
A parallel shift or a different slope of the whole cloud In a two-sample plot, a shift in location or in scale

Q-Q plot examples

Three examples cover most of what you will meet. In a well-behaved sample the points wander a little around the line, especially at the ends, because extreme order statistics vary most. In a right-skewed sample such as a lognormal one, the points bend upward at the right and lie above the line at the left. When one value has been mistyped (for example 80 instead of 8.0), the plot shows a single point far from an otherwise straight line, which is how Q-Q plots often catch data-entry errors. How much wiggle is normal depends on sample size: when the data really are normal, the correlation between the plotted values and the normal quantiles has a median of 0.9764 at n = 15 and 0.9992 at n = 1000, with its 2.5th percentile at 0.9265 and 0.9982 (own simulation in R 4.6.1, seed 2026, 10,000 replicates per n). Small samples therefore look rougher even when nothing is wrong.

Two-sample Q-Q plots and other reference distributions

NIST describes the two-sample case directly. If both samples are the same size, the plot is essentially the sorted values of one sample against the sorted values of the other. If the sizes differ, quantiles are chosen to match the smaller sample and the quantiles of the larger sample are interpolated. NIST also notes that the same method works for distributions other than the normal by replacing the normal percent point function with that distribution’s percent point function, so you can check data against a lognormal or exponential model in the same way. For a related distribution, see the lognormal distribution.

Assumptions and common mistakes

  • Judging by eye on small samples. Eight or fifteen points always look ragged; use the sample-size ranges above rather than a single impression.
  • Treating the plot as a test. A Q-Q plot is a diagnostic picture. A formal test such as the Shapiro-Wilk test in R gives a p value, and the two are best read together.
  • Swapping axes without noticing. Some programs put the sample on the horizontal axis. The shapes are mirrored, so check which axis is which before reading skew.
  • Confusing a probability plot with a Q-Q plot. The SciPy documentation notes that scipy.stats.probplot should not be confused with a Q-Q or a P-P plot, even though it draws the familiar normal probability plot.
  • Normality of the wrong thing. In regression and ANOVA the assumption usually concerns the residuals, not the raw outcome.

For a worked check inside a statistics package, see testing normality in SPSS.

How to report it (APA example)

State what you plotted, what you saw, and any supporting statistic. Report the figure as a numbered figure and give a one-sentence description in the text. For the worked example above:

A normal Q-Q plot of task-completion times (n = 8) showed the points close to the reference line, with the largest value slightly above it (Figure 1; r = 0.98 between the ordered values and the normal quantiles). The distribution was therefore treated as approximately normal.

If the plot shows a problem, say so and say what you did about it (for example a transformation or a rank-based test), rather than reporting only that normality was assumed.

How to calculate it in Excel, R or Python

Excel

Excel has no built-in Q-Q chart, so build the table above. Put the sorted values in A2:A9 and ranks 1 to 8 in B2:B9, then in C2 enter the formula below and fill it down. Insert a scatter chart with C on the horizontal axis and A on the vertical axis.

=NORM.S.INV((B2-0.5)/COUNT($A$2:$A$9))

R

The R stats documentation describes qqnorm as producing a normal QQ plot of the values in y, qqline as adding a line to a theoretical, by default normal, quantile-quantile plot, and qqplot as producing a QQ plot of two datasets.

x <- c(12, 15, 14, 10, 18, 13, 16, 22)
qqnorm(x)
qqline(x)

Python

According to the SciPy documentation, scipy.stats.probplot generates a probability plot of sample data against the quantiles of a specified theoretical distribution, normal by default, and returns the fitted line’s slope, intercept and correlation r.

import matplotlib.pyplot as plt
from scipy import stats
x = [12, 15, 14, 10, 18, 13, 16, 22]
(osm, osr), (slope, intercept, r) = stats.probplot(x, dist='norm', plot=plt)
plt.show()

FAQ

What is a QQ plot?

A QQ plot is a scatter plot of the ordered values in a sample against the quantiles expected from a reference distribution, usually the normal. Points near a straight line indicate that the sample matches the reference; curves and stray points show skew, tail differences or outliers.

Is scipy’s probplot a Q-Q plot?

It draws a normal probability plot of the same family, but the SciPy documentation cautions that it should not be confused with a Q-Q or P-P plot. For a two-sample comparison use R’s qqplot or sort and pair the quantiles yourself.

How do I read a Q-Q plot?

Check whether the points follow the straight reference line. Curves at the ends point to skew or tail differences, and isolated points far from the line point to outliers; the patterns table above lists the standard shapes. Small samples look rougher even when the data are normal.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Q-Q Plot: What It Is, How It Is Built, and How to Read It

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Ask CASRAI · Regulatory Radar

Research-admin question? Get an answer that links its sources.

An AI assistant specialized in research administration. Every answer links its sources to check before you act. 2 questions free, no account. $29/month after.

  • Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.
  • Every answer numbers its sources and links each one, so you can check the source yourself.