Quartiles divide a sorted data set into four equal groups. The first quartile (Q1) is the value below which the bottom 25% of the data falls; the second quartile (Q2) is the median, splitting the data exactly in half; and the third quartile (Q3) is the value below which 75% of the data falls. The interquartile range (IQR) is Q3 minus Q1 and represents the spread of the central 50% of your data. Because the IQR ignores the top and bottom quarters, it is not affected by extreme values and is often a better measure of spread than the full range when your data contain outliers. The IQR is also the basis of the Tukey fences, which identify potential outliers: the lower fence is Q1 minus 1.5 times the IQR and the upper fence is Q3 plus 1.5 times the IQR. Any value outside these fences is flagged as a potential outlier in many textbooks and statistical software packages. Quartiles are the foundation of the box-and-whisker plot, one of the most widely used tools for visualising data distributions. This calculator uses linear interpolation (the same approach as the percentile calculator) to handle data sets of any size. Enter your values as a comma-separated list of at least four numbers and you get Q1, Q2, Q3, IQR, lower fence, upper fence, and the count of data points. Data are sorted automatically. Useful for students learning descriptive statistics, analysts building box plots, and researchers checking the spread of a variable before further analysis.
The calculator sorts the data in ascending order. It uses the linear interpolation percentile formula to find Q1 (25th percentile), Q2 (50th percentile), and Q3 (75th percentile). The rank position for the p-th percentile is (p/100) times (n+1); the fractional part of that position determines how much to interpolate between adjacent sorted values. IQR equals Q3 minus Q1. The lower Tukey fence is Q1 minus 1.5 times IQR; the upper fence is Q3 plus 1.5 times IQR.
With data 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 (n = 10): Q1 at rank 2.75 = 5 + 0.75 x 2 = 6.00. Q2 at rank 5.5 = 11 + 0.5 x 2 = 11.00. Q3 at rank 8.25 = 15 + 0.25 x 2 = 16.00. IQR = 16 - 6 = 10.00. Lower fence = 6 - 1.5 x 10 = -9.00. Upper fence = 16 + 1.5 x 10 = 31.00. These match the default values pre-filled above.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-06-25 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.