UK-based online statistics and data analysis support for USA, UK, and international clients. No exams, no impersonation, no fabricated data.
Basic Descriptive Statistics Guides

Percentiles and Quartiles: SPSS, Python, R and Excel Guide with Quartile Interpretation

Learn Percentiles and Quartiles with SPSS output, Python charts, R charts, Excel formulas, percentile tables, Q1, median, Q3, IQR, and quartile interpretation.

Statistics guide Ethical learning support SPSS/R/Python/Excel friendly
Percentiles and Quartiles complete guide infographic showing Q1, median, Q3, IQR, G3 final grade distribution, percentile table, boxplot, percentile curve, and SPSS, Python, R, and Excel workflow.

Descriptive Statistics Guide

Percentiles and Quartiles: SPSS, Python, R and Excel Guide with Quartile Interpretation

Percentiles and Quartiles divide ordered data into meaningful positions. Percentiles show the value below which a given percentage of observations falls, while quartiles divide the data into four ordered parts. This Percentiles and Quartiles guide explains Q1, median, Q3, IQR, percentile curves, boxplots, SPSS output, Python charts, R charts and Excel calculation steps using G3 final grade data.

Google AdSense Placeholder

Quick Answer: Percentiles and Quartiles

Percentiles and Quartiles are position-based descriptive statistics. In this example, the 25th percentile of G3 is 10, the 50th percentile or median is 12, and the 75th percentile is 14. This means that about 25% of students scored at or below 10, about 50% scored at or below 12, and about 75% scored at or below 14.

The interquartile range is IQR = Q3 − Q1 = 14 − 10 = 4. Therefore, the middle 50% of G3 final grades lie between 10 and 14. In plain reporting language, Percentiles and Quartiles show that the central half of students scored within a fairly narrow four-point band, while some low scores and high scores create a wider full range from 0 to 19.

Valid cases649
G3 Q1 / 25th10
G3 Median / 50th12
G3 Q3 / 75th14

Main Percentiles and Quartiles Result

G3 final grade: Q1 = 10, median = 12, Q3 = 14, IQR = 4, minimum = 0 and maximum = 19.

Interpretation: The middle 50% of students scored between 10 and 14. The 90th percentile is 16 and the 95th percentile is 17, showing that the strongest upper-end results are concentrated in the high teens.

Conclusion: Percentiles and Quartiles are more robust than the mean when the dataset includes skewness, outliers or a discrete grade scale.

Table of Contents

  1. What Are Percentiles and Quartiles?
  2. Percentiles and Quartiles Formulas
  3. Dataset and Verified SPSS Results
  4. G3 Percentile Table
  5. Quartile Summary for Key Variables
  6. G3 Quartile Groups
  7. Python Chart-by-Chart Interpretation
  8. R Chart-by-Chart Interpretation
  9. SPSS Workflow and Output Interpretation
  10. R, Python and Excel Workflows
  11. APA and Report Writing
  12. When to Use Percentiles and Quartiles
  13. Downloads and Resources
  14. Related Guides
  15. FAQs

What Are Percentiles and Quartiles?

Percentiles and Quartiles are descriptive statistics used to understand the position of values inside an ordered dataset. A percentile tells us the value below which a certain percentage of the data falls. For example, the 25th percentile is the value at or below which about 25% of observations fall. The 90th percentile is the value at or below which about 90% of observations fall.

Quartiles are special percentiles. The first quartile, or Q1, is the 25th percentile. The second quartile, or Q2, is the median or 50th percentile. The third quartile, or Q3, is the 75th percentile. Together, Q1, Q2 and Q3 provide a compact description of the distribution center and spread.

Percentiles and Quartiles are especially useful when a mean alone is not enough. A mean can be pulled by extreme values, while quartiles focus on ordered positions. This is why quartiles are central to box plot interpretation, five number summary, descriptive statistics and outlier checking.

Simple interpretation: If G3 has Q1 = 10, median = 12 and Q3 = 14, then the lower quarter is around 10 or below, the middle point is 12, and the upper quarter begins around 14. The middle half of the distribution lies between 10 and 14.

Google AdSense Placeholder

Percentiles and Quartiles Formulas

There are several software-specific percentile calculation methods, so exact percentile values can sometimes differ slightly between SPSS, R, Python and Excel. However, the concept is the same: sort the values from smallest to largest, then identify the value at a selected cumulative position.

Quartile definitions:

Q1 = 25th percentile

Q2 = 50th percentile = median

Q3 = 75th percentile

IQR = Q3 − Q1

For this G3 example, Percentiles and Quartiles are interpreted as follows:

MeasureValueMeaning
Q1 / 25th percentile10About 25% of G3 scores are at or below 10.
Q2 / 50th percentile / Median12About half of G3 scores are at or below 12.
Q3 / 75th percentile14About 75% of G3 scores are at or below 14.
IQR4The middle 50% of G3 scores lie across a four-point range from 10 to 14.

Dataset and Verified SPSS Results for Percentiles and Quartiles

This Percentiles and Quartiles guide uses the student performance dataset. The main variable is G3 final grade, and the supporting variables are G1, G2, age and absences. The SPSS output contains 649 valid cases and no missing values for these variables.

VariableValid NMissingMeanMedianStd. DeviationMinimumMaximumRole
G1649011.4011.002.745019First-period grade
G2649011.5711.002.914019Second-period grade
G3649011.9112.003.231019Main final-grade variable
age649016.7417.001.2181522Student age
absences64903.662.004.641032School absences

Verified result: G3 has mean = 11.91, median = 12.00, mode = 11, standard deviation = 3.231, minimum = 0, maximum = 19, Q1 = 10, Q2 = 12 and Q3 = 14. These values are the foundation of the Percentiles and Quartiles interpretation in this post.

G3 Percentile Table for Percentiles and Quartiles

The SPSS percentile table gives a more detailed view of G3 than quartiles alone. Quartiles focus on the 25th, 50th and 75th percentiles, while the full percentile table also includes the 5th, 10th, 90th and 95th percentiles.

G3 PercentileValueInterpretation
5th percentile8.00Only a small lower-end group scored at or below about 8.
10th percentile8.00About 10% of scores are at or below 8.
25th percentile / Q110.00The lower quartile boundary is 10.
50th percentile / Median / Q212.00The central score is 12.
75th percentile / Q314.00The upper quartile boundary is 14.
90th percentile16.00About 90% of students scored at or below 16.
95th percentile17.00The top 5% of scores are above about 17.

This table shows why Percentiles and Quartiles are useful for student grade interpretation. Instead of saying only “the mean is 11.91,” we can say that the central half of students scored between 10 and 14, and that the high-performing upper tail starts around 16 to 17.

Quartile Summary for Key Variables

The Percentiles and Quartiles summary below compares G1, G2, G3, age and absences. This comparison helps identify which variables are tightly concentrated and which variables have wider spread.

VariableQ1 / 25thMedian / 50thQ3 / 75thIQRInterpretation
G110.0011.0013.003.00Middle 50% of first-period grades fall between 10 and 13.
G210.0011.0013.003.00Middle 50% of second-period grades also fall between 10 and 13.
G310.0012.0014.004.00Final grade has a slightly wider middle spread than G1 and G2.
age16.0017.0018.002.00Age is tightly concentrated between 16 and 18.
absences0.002.006.006.00Absences are more spread out and right-skewed.

Important interpretation: Absences have the largest IQR among the variables shown here. This means the middle 50% of absence values spread from 0 to 6, while some students have much higher absence counts. In contrast, age has a narrow IQR of only 2.

G3 Quartile Groups

SPSS can also create quartile groups. In this Percentiles and Quartiles analysis, G3 was ranked in ascending order and divided into four percentile groups. Because G3 has many tied grade values, the groups are not exactly 25% each. This is normal when the variable is discrete and many students share the same score.

G3 Quartile GroupFrequencyPercentCumulative PercentMeaning
119730.4%30.4%Lowest G3 quartile band.
210416.0%46.4%Lower-middle G3 quartile band.
321733.4%79.8%Upper-middle G3 quartile band.
413120.2%100.0%Highest G3 quartile band.

G3 Mean and Range by Quartile Group

G3 Quartile GroupNMeanMedianStd. DeviationMinimumMaximumInterpretation
11978.429.002.699010Lowest score band, including very low G3 values.
210411.0011.000.0001111All cases in this band have G3 = 11 because of tied values.
321712.9613.000.7891214Middle-to-upper score band.
413116.1216.001.0891519Highest score band.
Google AdSense Placeholder

Python Chart-by-Chart Interpretation for Percentiles and Quartiles

The Python charts below explain Percentiles and Quartiles visually. Each chart should be read together with the SPSS table because the chart shows the pattern and the SPSS output provides the verified values.

Percentiles and Quartiles Python distribution with Q1 median and Q3 lines for G3
Figure 1. Distribution with quartile lines for Percentiles and Quartiles. This chart shows the G3 distribution with dashed lines for Q1, median and Q3. Q1 is 10, the median is 12 and Q3 is 14. The tallest bars appear around the main scoring area, while the quartile lines mark the middle structure of the distribution. The interpretation is that the central half of G3 scores lies between 10 and 14. The chart also shows some very low values near 0 and high values near 19, which explains why percentiles and quartiles are useful alongside the mean.
Percentiles and Quartiles Python boxplots for G1 G2 G3 age and absences
Figure 2. Boxplots for key variables in Percentiles and Quartiles. The boxplots summarize G1, G2, G3, age and absences. The box itself represents the interquartile range from Q1 to Q3, and the line inside the box represents the median. G3 has a median of 12 and an IQR from 10 to 14. Age has a narrow IQR from 16 to 18, while absences have a wider and more skewed pattern from Q1 = 0 to Q3 = 6. This chart confirms that percentiles and quartiles make spread easier to compare across variables.
Percentiles and Quartiles Python percentile curve for G3
Figure 3. Percentile curve for G3 in Percentiles and Quartiles. The percentile curve shows how G3 values increase from lower percentiles to higher percentiles. The curve marks P25 = 10, P50 = 12 and P75 = 14. The flat sections appear because G3 is a discrete grade variable and many students share the same score. The curve rises sharply from the lowest percentiles, becomes more gradual around the middle, and reaches the upper grade range near the highest percentiles. This visual explains why quartile values are stable and easy to report.
Percentiles and Quartiles Python quartile comparison across variables
Figure 4. Quartile comparison across variables for Percentiles and Quartiles. Each point shows the median, while the whisker shows the Q1-to-Q3 interquartile range. G1 and G2 both have medians of 11 and IQR values from 10 to 13. G3 has a median of 12 and an IQR from 10 to 14. Age has the tightest practical spread, with median 17 and IQR from 16 to 18. Absences show the widest relative spread, with median 2 and IQR from 0 to 6. This chart is the clearest comparison of central position and middle spread.

R Chart-by-Chart Interpretation for Percentiles and Quartiles

The R charts repeat the same Percentiles and Quartiles analysis in a second workflow. This helps confirm that the interpretation is based on the data values, not on one software package.

Percentiles and Quartiles R distribution with quartile lines for G3
Figure 5. R distribution with quartile lines for Percentiles and Quartiles. The R histogram shows G3 values and marks Q1 = 10, median = 12 and Q3 = 14. These three vertical reference lines divide the ordered distribution into meaningful sections. The middle half of the distribution is between Q1 and Q3. The chart confirms that most G3 scores cluster around the center, but the full distribution still includes lower and higher values that are not captured by the median alone.
Percentiles and Quartiles R boxplots for key numeric variables
Figure 6. R boxplots for key variables in Percentiles and Quartiles. The R boxplots give the five-number-summary view of G1, G2, G3, age and absences. The thick horizontal line is the median, the box shows the IQR, and the points show possible extreme values. G3 has a wider IQR than G1 and G2, while absences show a strongly uneven pattern with high outlying values. This makes the boxplot one of the most useful charts for explaining percentiles and quartiles to students.
Percentiles and Quartiles R percentile curve for G3
Figure 7. R percentile curve for G3 in Percentiles and Quartiles. The R percentile curve moves from the lowest observed scores to the highest observed scores. P25 is 10, P50 is 12 and P75 is 14. The stepped shape appears because grade scores are repeated. This chart is useful when explaining that percentiles are not categories by themselves; they are positions in an ordered distribution.
Percentiles and Quartiles R quartile comparison across variables
Figure 8. R quartile comparison across variables for Percentiles and Quartiles. The R comparison plot shows medians and IQR ranges together. This is helpful because variables such as G1, G2 and G3 share similar scales, while age and absences have different distribution patterns. The plot shows that absences have a low median but a much wider IQR than age. This means many students have few absences, but a smaller group has substantially higher absences.

SPSS Workflow for Percentiles and Quartiles

The SPSS output for this Percentiles and Quartiles guide includes percentile tables, quartile summaries, boxplot review, G3 quartile groups and G3 summary by quartile band.

Open the Percentiles and Quartiles SPSS Output PDF

SPSS Menu Steps

GoalSPSS Menu PathPurpose
Get percentile table for G3Analyze > Descriptive Statistics > Frequencies > StatisticsSelect percentiles such as 5, 10, 25, 50, 75, 90 and 95.
Get quartiles for key variablesAnalyze > Descriptive Statistics > FrequenciesRequest quartiles for G1, G2, G3, age and absences.
Review boxplotsAnalyze > Descriptive Statistics > Explore > PlotsCreate boxplots and check medians, IQR and possible extreme values.
Create quartile groupsTransform > Rank CasesCreate percentile groups for G3.
Summarize G3 by quartile groupAnalyze > Compare Means > MeansReport mean, median, standard deviation, minimum and maximum by quartile group.

SPSS Syntax for Percentiles and Quartiles

* Percentiles and Quartiles - SPSS Syntax.

TITLE "Percentiles and Quartiles".

DATASET ACTIVATE PercentilesQuartilesData.

* Percentile table for G3.
FREQUENCIES VARIABLES=G3
  /FORMAT=NOTABLE
  /STATISTICS=MEAN MEDIAN MODE STDDEV VARIANCE SKEWNESS SESKEW KURTOSIS SEKURT RANGE MINIMUM MAXIMUM
  /PERCENTILES=5 10 25 50 75 90 95
  /ORDER=ANALYSIS.

* Quartile summary for key numeric variables.
FREQUENCIES VARIABLES=G1 G2 G3 age absences
  /FORMAT=NOTABLE
  /STATISTICS=MEAN MEDIAN STDDEV RANGE MINIMUM MAXIMUM
  /PERCENTILES=25 50 75
  /ORDER=ANALYSIS.

* Boxplot review.
EXAMINE VARIABLES=G1 G2 G3 age absences
  /PLOT=BOXPLOT
  /STATISTICS=DESCRIPTIVES
  /CINTERVAL=95
  /MISSING=LISTWISE
  /NOTOTAL.

* Create G3 quartile groups.
RANK VARIABLES=G3 (A)
  /NTILES(4)
  /PRINT=YES
  /TIES=MEAN
  /RANK INTO G3_quartile.

FREQUENCIES VARIABLES=G3_quartile
  /ORDER=ANALYSIS.

* Summary of G3 by quartile group.
MEANS TABLES=G3 BY G3_quartile
  /CELLS=COUNT MEAN MEDIAN STDDEV MIN MAX.

OUTPUT EXPORT
  /CONTENTS EXPORT=VISIBLE
  /PDF DOCUMENTFILE="Percentiles-and-Quartiles-SPSS-Output.pdf".

R, Python and Excel Workflows for Percentiles and Quartiles

Python Workflow for Percentiles and Quartiles

import pandas as pd
import numpy as np

df = pd.read_csv("dataset.csv")

numeric_vars = ["G1", "G2", "G3", "age", "absences"]
for col in numeric_vars:
    df[col] = pd.to_numeric(df[col], errors="coerce")

# Main G3 percentiles
g3 = df["G3"].dropna()

percentile_values = {
    "P5": np.percentile(g3, 5),
    "P10": np.percentile(g3, 10),
    "Q1 / P25": np.percentile(g3, 25),
    "Median / P50": np.percentile(g3, 50),
    "Q3 / P75": np.percentile(g3, 75),
    "P90": np.percentile(g3, 90),
    "P95": np.percentile(g3, 95)
}

q1 = np.percentile(g3, 25)
median = np.percentile(g3, 50)
q3 = np.percentile(g3, 75)
iqr = q3 - q1

print("G3 Percentiles and Quartiles")
print(percentile_values)
print("IQR:", iqr)

# Quartile summary for key variables
summary_rows = []
for col in numeric_vars:
    values = df[col].dropna()
    q1 = np.percentile(values, 25)
    q2 = np.percentile(values, 50)
    q3 = np.percentile(values, 75)
    summary_rows.append({
        "variable": col,
        "q1": q1,
        "median": q2,
        "q3": q3,
        "iqr": q3 - q1,
        "minimum": values.min(),
        "maximum": values.max()
    })

summary = pd.DataFrame(summary_rows)
print(summary)

R Workflow for Percentiles and Quartiles

# R: Percentiles and Quartiles

df <- read.csv("dataset.csv")

numeric_vars <- c("G1", "G2", "G3", "age", "absences")

# Main G3 percentiles
g3_percentiles <- quantile(
  df$G3,
  probs = c(.05, .10, .25, .50, .75, .90, .95),
  na.rm = TRUE
)

print(g3_percentiles)

q1 <- quantile(df$G3, .25, na.rm = TRUE)
median_g3 <- quantile(df$G3, .50, na.rm = TRUE)
q3 <- quantile(df$G3, .75, na.rm = TRUE)
iqr_g3 <- IQR(df$G3, na.rm = TRUE)

cat("Q1:", q1, "\n")
cat("Median:", median_g3, "\n")
cat("Q3:", q3, "\n")
cat("IQR:", iqr_g3, "\n")

# Quartile summary for key variables
quartile_summary <- data.frame(
  variable = numeric_vars,
  q1 = sapply(df[numeric_vars], quantile, probs = .25, na.rm = TRUE),
  median = sapply(df[numeric_vars], quantile, probs = .50, na.rm = TRUE),
  q3 = sapply(df[numeric_vars], quantile, probs = .75, na.rm = TRUE),
  iqr = sapply(df[numeric_vars], IQR, na.rm = TRUE)
)

print(quartile_summary)

Excel Workflow for Percentiles and Quartiles

Excel can calculate Percentiles and Quartiles quickly using built-in formulas. Put the G3 values in one column, for example cells A2:A650, then use these formulas:

TaskExcel FormulaMeaning
Q1 / 25th percentile=QUARTILE.INC(A2:A650,1)Returns the first quartile.
Median / Q2=MEDIAN(A2:A650)Returns the 50th percentile.
Q3 / 75th percentile=QUARTILE.INC(A2:A650,3)Returns the third quartile.
IQR=QUARTILE.INC(A2:A650,3)-QUARTILE.INC(A2:A650,1)Returns the interquartile range.
90th percentile=PERCENTILE.INC(A2:A650,0.90)Returns the value at the 90th percentile.
95th percentile=PERCENTILE.INC(A2:A650,0.95)Returns the value at the 95th percentile.

APA and Report Writing for Percentiles and Quartiles

A clear Percentiles and Quartiles report should include the valid sample size, Q1, median, Q3, IQR, minimum and maximum. When interpreting student grades, it is also useful to include the 90th and 95th percentiles to describe the upper end of the distribution.

APA-style report: G3 final grade scores were summarized using percentiles and quartiles. There were 649 valid cases and no missing values. The median G3 score was 12.00, with Q1 = 10.00 and Q3 = 14.00. The interquartile range was 4.00, indicating that the middle 50% of students scored between 10 and 14. The minimum score was 0 and the maximum score was 19. The 90th percentile was 16.00 and the 95th percentile was 17.00.

For a shorter report, write: “The middle 50% of G3 final grades fell between 10 and 14, with a median of 12.” This sentence gives the reader a practical understanding of the distribution without requiring a full technical table.

When to Use Percentiles and Quartiles

Percentiles and Quartiles are useful when the goal is to describe position, spread and ordered performance rather than only average performance. They are common in education, psychology, business analytics, survey analysis, health scores, ranking systems and outlier detection.

Use Percentiles and Quartiles WhenWhy It Helps
You need to describe the middle 50% of values.Q1 and Q3 show the central band more clearly than minimum and maximum.
The distribution includes outliers.The median and IQR are less affected by extreme values than the mean and range.
You want to compare spread across variables.IQR allows a compact comparison of middle spread.
You need a boxplot interpretation.Boxplots are built from quartiles, median, whiskers and possible outliers.
You want to classify cases into quartile groups.Quartile bands can divide students or observations into lower, middle and upper performance groups.

Best practical use: Use Percentiles and Quartiles with mean, standard deviation, histogram and boxplot. Together, they give a complete descriptive picture: average level, typical position, middle spread, full range and possible outliers.

Downloads and Resources for Percentiles and Quartiles

Use the SPSS output PDF and chart links below to review the complete Percentiles and Quartiles analysis.

External References

FAQs About Percentiles and Quartiles

What are Percentiles and Quartiles?

Percentiles and Quartiles are position-based descriptive statistics. Percentiles show values at selected percentage positions, while quartiles divide ordered data into four parts using Q1, median and Q3.

What is Q1 in Percentiles and Quartiles?

Q1 is the first quartile, also called the 25th percentile. In this G3 example, Q1 = 10, meaning about 25% of students scored at or below 10.

What is Q2 in Percentiles and Quartiles?

Q2 is the second quartile, also called the median or 50th percentile. In this G3 example, Q2 = 12, meaning about half of students scored at or below 12.

What is Q3 in Percentiles and Quartiles?

Q3 is the third quartile, also called the 75th percentile. In this G3 example, Q3 = 14, meaning about 75% of students scored at or below 14.

What is the IQR for G3?

The IQR for G3 is Q3 minus Q1, so IQR = 14 − 10 = 4. This means the middle 50% of G3 scores lie between 10 and 14.

Why are Percentiles and Quartiles useful?

Percentiles and Quartiles are useful because they describe ordered position and middle spread. They are less sensitive to extreme values than the mean and standard deviation.

How do I calculate Percentiles and Quartiles in Excel?

Use formulas such as QUARTILE.INC(range,1) for Q1, MEDIAN(range) for Q2, QUARTILE.INC(range,3) for Q3 and PERCENTILE.INC(range,0.90) for the 90th percentile.

Google AdSense Placeholder

Need help applying this to your own data?

Salar Cafe can help interpret output, clean datasets, review assumptions, build dashboards and explain statistical results ethically.

Need help interpreting your data analysis results?

Contact Salar Cafe
Engr. Muhammad Yar Saqib author profile photo

Engr. Muhammad Yar Saqib

WhatsApp Get Data Analysis Help