Quartile and Percentile Calculator: Q1, Q3, IQR, Five-Number Summary and Box Plot
Paste your numbers to get Q1, the median and Q3, the interquartile range, the five-number summary, outlier fences and any percentile you choose, with a box plot. Pick the method: inclusive (Excel PERCENTILE.INC, R type 7, the default) or exclusive (Excel PERCENTILE.EXC). Nothing is saved.
- PriceFree, no login or sign-up needed
- Your dataCalculated in your browser; nothing is saved
- Works onPhone, tablet or computer, any modern browser
- Made byDr. Muhammad Aammar Tufail, Codanics
- Published24 November 2026
- Last updated24 November 2026
📚 How to cite this tool
This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.
Tufail, M. A. (2026). Percentile and quartile calculator [Online tool]. Codanics. Retrieved 24 November 2026, from https://codanics.com/tools/percentile-quartile-calculator/
In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)
The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 24 November 2026.
How to use the percentile and quartile calculator
- Paste or type your numbers. They do not need to be sorted.
- Keep the inclusive method (Excel PERCENTILE.INC, R’s default) or choose exclusive if your course or software uses PERCENTILE.EXC.
- Optionally enter a percentile to find (for example 90) and a value whose percentile rank you want.
- Read Q1, the median, Q3, IQR, the outlier fences and the box plot, with each position worked out underneath.
What are quartiles and percentiles?
The p-th percentile is the value below which p% of the data fall; the quartiles are the 25th (Q1), 50th (median, Q2) and 75th (Q3) percentiles, and the interquartile range is IQR = Q3 − Q1. Together with the minimum and maximum they make the five-number summary that a box plot draws.
Methods: why calculators give different quartiles
When a percentile falls between two data values, it has to be interpolated, and there are several rules. Hyndman and Fan (1996) list nine. This tool offers the two used most:
| Method | Position of the p-th percentile | Software |
|---|---|---|
| Inclusive (default) | h = (n − 1)p + 1 | Excel PERCENTILE.INC, QUARTILE.INC, old PERCENTILE; R quantile() type 7; NumPy default; Google Sheets |
| Exclusive | h = (n + 1)p | Excel PERCENTILE.EXC, QUARTILE.EXC; R type 6; Minitab; SPSS |
If h is a whole number, the percentile is that value in the sorted list. Otherwise take the value at the whole part of h and add the fraction of h times the gap to the next value. Textbooks that “split the data in halves” (Tukey’s hinges) can differ slightly again; always state the method you used.
Worked example
Data (n = 13, sorted): 12, 15, 17, 18, 20, 21, 22, 23, 25, 26, 28, 31, 58.
- Inclusive Q1: h = 12 × 0.25 + 1 = 4, so Q1 = the 4th value = 18. Median: h = 7, so 22. Q3: h = 10, so 26.
- IQR = 26 − 18 = 8. Fences: 18 − 12 = 6 and 26 + 12 = 38, so 58 is an outlier.
- 90th percentile (inclusive): h = 12 × 0.9 + 1 = 11.8, so 28 + 0.8 × (31 − 28) = 30.4.
- Exclusive method: Q1: h = 14 × 0.25 = 3.5, so 17 + 0.5 × 1 = 17.5; Q3: h = 10.5, so 27; P90: h = 12.6, so 31 + 0.6 × 27 = 47.2.
How to use quartiles
- Report median (IQR) or median [Q1, Q3] for skewed data, for example “median 22 (IQR 18–26)”.
- Values beyond Q1 − 1.5 × IQR or Q3 + 1.5 × IQR are possible outliers (Tukey’s rule). Check them for typing errors before removing anything.
- Percentile rank answers the reverse question: what percent of values are below a given score.
Frequently asked questions
How do I find Q1 and Q3?
Sort the data. For the inclusive method, Q1 is at position (n − 1) × 0.25 + 1 and Q3 at (n − 1) × 0.75 + 1. If a position falls between two values, interpolate between them. The calculator shows each step.
Why does my textbook or Excel give a different quartile?
There are several quartile methods. Excel QUARTILE.INC and R’s default use the inclusive method; QUARTILE.EXC, Minitab and SPSS use the exclusive one. Choose the matching method above; the comparison table shows both.
What is the interquartile range (IQR)?
IQR = Q3 − Q1, the range of the middle 50% of the data. It is not affected by extreme values, so it is a robust measure of spread.
How are outliers found with the IQR?
A value is a possible outlier if it is below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. Values beyond 3 × IQR are sometimes called extreme outliers.
What is the difference between percentile and percentile rank?
A percentile is a value (the 90th percentile is 30.4); a percentile rank is a percentage (a score of 25 is at the 65th percentile rank).
Is my data saved?
No. Everything is calculated in your browser and nothing is saved or uploaded.
Do I need to log in or create an account to use the percentile and quartile calculator?
No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.
How do I cite this tool in my thesis or paper?
Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). Percentile and quartile calculator [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/percentile-quartile-calculator/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.
Free guides and courses from Codanics
More free tools
See all free Codanics tools → · Codanics on YouTube · WhatsApp channel