Quartiles & Quantiles | Calculation, Definition & Interpretation

Quartiles are three values that split sorted data into four parts, each with an equal number of observations. Quartiles are a type of quantile.

  • First quartile: Also known as Q1, or the lower quartile. This is the number halfway between the lowest number and the middle number.
  • Second quartile: Also known as Q2, or the median. This is the middle number halfway between the lowest number and the highest number.
  • Third quartile: Also known as Q3, or the upper quartile. This is the number halfway between the middle number and the highest number.

Quartile example

Quartiles can also split probability distributions into four parts, each with an equal probability.

What are quartiles?

Quartiles are a set of descriptive statistics. They summarize the central tendency and variability of a dataset or distribution.

Quartiles are a type of percentile. A percentile is a value with a certain percentage of the data falling below it. In general terms, k% of the data falls below the kth percentile.

  • The first quartile (Q1, or the lowest quartile) is the 25th percentile, meaning that 25% of the data falls below the first quartile.
  • The second quartile (Q2, or the median) is the 50th percentile, meaning that 50% of the data falls below the second quartile.
  • The third quartile (Q3, or the upper quartile) is the 75th percentile, meaning that 75% of the data falls below the third quartile.

By splitting the data at the 25th, 50th, and 75th percentiles, the quartiles divide the data into four equal parts.

  • In a sample or dataset, the quartiles divide the data into four groups with equal numbers of observations.
  • In a probability distribution, the quartiles divide the distribution’s range into four intervals with equal probability.

Quartiles probability distribution

Prevent plagiarism. Run a free check.

Try for free

How to find quartiles

To find the quartiles of a dataset or sample, follow the step-by-step guide below.

  1. Count the number of observations in the dataset (n).
  2. Sort the observations from smallest to largest.
  3. Find the first quartile:
    • Calculate n * (1 / 4).
    • If n * (1 / 4) is an integer, then the first quartile is the mean of the numbers at positions n * (1 / 4) and n * (1 / 4) + 1.
    • If n * (1 / 4) is not an integer, then round it up. The number at this position is the first quartile.
Tip: An integer is a whole number—it can be written without any numbers after the decimal place.
  1. Find the second quartile:
    • Calculate  n * (2 / 4).
    • If n * (2 / 4) is an integer, the second quartile is the mean of the numbers at positions n * (2 / 4) and n * (2 / 4) + 1.
    •  If n * (2 / 4) is not an integer, then round it up. The number at this position is the second quartile.
  2. Find the third quartile:
    • Calculate n * (3 / 4).
    • If n * (3 / 4) is an integer, then the third quartile is the mean of the numbers at positions n * (3 / 4) and n * (3 / 4) + 1.
    • If n * (3 / 4) is not an integer, then round it up. The number at this position is the third quartile.

There are multiple methods to calculate the first and third quartiles, and they don’t always give the same answers. There’s no universal agreement on the best way to calculate quartiles.

Lower and upper quartile calculator

You can calculate the lower and upper quartile by hand or with the help of our calculator below. You can switch between the lower and upper quartile in the input field. Just type “lower quartile x,y,z” to calculate the lower quartile of your data set, or “upper quartile x,y,z” for the upper quartile of your data set.

Step-by-step example

Imagine you conducted a small study on language development in children 1–6 years old. You’re writing a paper about the study and you want to report the quartiles of the children’s ages.

Age (years) 1 2 3 4 5 6
Frequency 2 3 4 1 2 2
Step 1: Count the number of observations in the dataset
n = 2 + 3 + 4 + 1 + 2 + 2 = 14
Step 2: Sort the observations in increasing order

1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 6, 6

Step 3: Find the first quartile
n * (1 / 4) = 14 * (1 / 4) = 3.5
3.5 is not an integer, so Q1 is the number at position 4.
1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 6, 6
Q1 = 2 years
Step 4: Find the second quartile
n * (2 / 4) = 14 * (2 / 4) = 7
7 is an integer, so Q2 is the mean of the numbers at positions 7 and 8.
1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 6, 6
Q2 = (3 + 3) / 2
Q2 = 3 years
Step 5: Find the third quartile
n * (3 / 4) = 14 * (3 / 4) = 10.5
10.5 is not an integer, so Q3 is the number at position 11.
1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 6, 6
Q3 = 5 years

Receive feedback on language, structure, and formatting

Professional editors proofread and edit your paper by focusing on:

  • Academic style
  • Vague sentences
  • Grammar
  • Style consistency

See an example

Visualizing quartiles with boxplots

Boxplots are helpful visual summaries of a dataset. They’re composed of boxes, which show the quartiles, and whiskers, which show the lowest and highest observations.

To make a boxplot, you first need to calculate the five-number summary:

  1. The minimum
    • This is the lowest observation. If you order the numbers in your dataset from lowest to highest, the minimum is the first number. The minimum is sometimes called the zeroth quantile.
  2. The first quartile
  3. The second quartile
  4. The third quartile
  5. The maximum
    • This is the highest observation. If you order the numbers in your dataset from lowest to highest, the maximum is the last number. The maximum is sometimes called the fourth quantile.

With these five numbers, you can draw a boxplot:

Quartile with boxplots

This isn’t the only method of drawing boxplots. Although the box always indicates the quartiles, often the whiskers indicate 1.5 IQR from the Q1 and Q3.

Example: Creating a boxplot
In your study of language development in young children, the 14 participants were the following ages (in years):

1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 6, 6

To create a boxplot, the first step is to calculate the five-number summary:

  1. The minimum: 1 year old
  2. The first quartile: 2 years old
  3. The second quartile: 3 years old
  4. The third quartile: 5 years old
  5. The maximum: 6 years old

These numbers determine the position of the box and whiskers on a number line:

Quartiles boxplot

Interpreting quartiles

Quartiles can give you useful information about an observation or a dataset.

Comparing observations

Quartiles are helpful for understanding an observation in the context of the rest of a sample or population. By comparing the observation to the quartiles, you can determine whether the observation is in the bottom 25%, middle 50%, or top 25%.

Median

The second quartile, better known as the median, is a measure of central tendency. This middle number is a good measure of the average or most central value of the data, especially for skewed distributions or distributions with outliers.

Interquartile range

The distance between the first and third quartiles—the interquartile range (IQR)—is a measure of variability. It indicates the spread of the middle 50% of the data.

IQR = Q3 − Q1

The IQR is an especially good measure of variability for skewed distributions or distributions with outliers. IQR only includes the middle 50% of the data, so, unlike the range, the IQR isn’t affected by extreme values.

Skewness

The distance between quartiles can give you a hint about whether a distribution is skewed or symmetrical. It’s easiest to use a boxplot to look at the distances between quartiles:

Quartiles skewness

Note that a histogram or skewness measure will give you a more reliable indication of skewness.

Identifying outliers

The interquartile range (IQR) can be used to identify outliers. Outliers are observations that are extremely high or low. One definition of an outlier is any observation that is more than 1.5 IQR away from the first or third quartile.

What are quantiles?

A quartile is a type of quantile.

Quantiles are values that split sorted data or a probability distribution into equal parts. In general terms, a q-quantile divides sorted data into q parts. The most commonly used quantiles have special names:

  • Quartiles (4-quantiles): Three quartiles split the data into four parts.
  • Deciles (10-quantiles): Nine deciles split the data into 10 parts.
  • Percentiles (100-quantiles): 99 percentiles split the data into 100 parts.

      There is always one fewer quantile than there are parts created by the quantiles.

      How to find quantiles

      To find a q-quantile, you can follow a similar method to that used for quartiles, except in steps 3–5, multiply n by multiples of 1/q instead of 1/4.

      For example, to find the third 5-quantile:

      1. Calculate n * (3 / 5).
      2. If  n * (3 / 5) is an integer, then the third 5-quantile is the mean of the numbers at positions  n * (3 / 5) and n * (3 / 5) + 1.
      3. If n * (3 / 5) is not an integer, then round it up. The number at this position is the third 5-quantile.

      Practice questions

      powered by Typeform

      Other interesting articles

      If you want to know more about statistics, methodology, or research bias, make sure to check out some of our other articles with explanations and examples.

      Frequently asked questions about quartiles and quantiles

      How do I find quartiles in Excel?

      You can use the QUARTILE() function to find quartiles in Excel. If your data is in column A, then click any blank cell and type “=QUARTILE(A:A,1)” for the first quartile, “=QUARTILE(A:A,2)” for the second quartile, and “=QUARTILE(A:A,3)” for the third quartile.

      How do I find quartiles in R?

      You can use the quantile() function to find quartiles in R. If your data is called “data”, then “quantile(data, prob=c(.25,.5,.75), type=1)” will return the three quartiles.

      How do I find the quartiles of a probability distribution?

      To find the quartiles of a probability distribution, you can use the distribution’s quantile function.

      What’s the best measure of central tendency to use?

      The mean is the most frequently used measure of central tendency because it uses all values in the data set to give you an average.

      For data from skewed distributions, the median is better than the mean because it isn’t influenced by extremely large values.

      The mode is the only measure you can use for nominal or categorical data that can’t be ordered.

      What is variability?

      Variability tells you how far apart points lie from each other and from the center of a distribution or a data set.

      Variability is also referred to as spread, scatter or dispersion.

      Cite this Scribbr article

      If you want to cite this source, you can copy and paste the citation or click the “Cite this Scribbr article” button to automatically add the citation to our free Citation Generator.

      Turney, S. (2023, June 21). Quartiles & Quantiles | Calculation, Definition & Interpretation. Scribbr. Retrieved January 8, 2024, from https://www.scribbr.com/statistics/quartiles-quantiles/

      Is this article helpful?
      Shaun Turney

      During his MSc and PhD, Shaun learned how to apply scientific and statistical methods to his research in ecology. Now he loves to teach students how to collect and analyze data for their own theses and research projects.