Nth Smallest Value: Formula & How to Find It
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator finds the nth smallest value in a list of numbers. You enter a list of numbers and a rank n, and it returns the value that sits at that position when the list is sorted from smallest to largest. For example, in the list 8, 3, 10, 1, 6, the 2nd smallest value is 3.
Formula
Let L = {x₁, x₂, x₃, …, xₘ} be a list of m numbers. To find the nth smallest value:
- Sort the list in ascending order: x(1) ≤ x(2) ≤ … ≤ x(m).
- The nth smallest value is x(n).
Here, n is the rank (1 = smallest, 2 = second smallest, etc.), and m is the total count of numbers. The sorted list uses 1-based indexing, so the first element after sorting is the 1st smallest.
Worked Example
Using the default values from the calculator: list = 8, 3, 10, 1, 6 and n = 2.
- Sort the list ascending: 1, 3, 6, 8, 10
- The 2nd smallest value is the element at position 2: 3
The calculator returns 3, matching the manual result.
When to Use This Calculator
Finding the nth smallest value is a common task in statistics, data analysis, and everyday decision-making. You might use it to:
- Find the median (the middle value) of a dataset – for an odd-sized list, the median is the (m+1)/2 th smallest value.
- Identify a percentile – the 25th percentile is roughly the 0.25 × (m+1) th smallest value.
- Compare rankings – e.g., “What is the 3rd lowest temperature this month?”
- Remove outliers – sometimes you need to ignore the smallest few values before calculating an average.
The calculator works for any list of numbers, whether they are whole numbers, decimals, or negative values.
How to Read the Result
The result is the value at the nth position in the sorted list. If n = 1, you get the minimum. If n = m (the total count), you get the maximum. If n is not an integer between 1 and m, the calculator will not produce a valid result – you must enter a whole number within that range.
Note that if there are duplicate values, they are counted separately. For example, in the list 2, 2, 3, the 1st smallest is 2, the 2nd smallest is also 2, and the 3rd smallest is 3.
Common Mistakes and Misconceptions
- Off-by-one errors: The 1st smallest is the minimum, not the 0th. If you want the 3rd smallest, n = 3, not 2.
- Sorting order: Always sort ascending. The nth smallest is not the same as the nth largest (which would be the (m – n + 1)th smallest).
- Ignoring duplicates: Duplicates occupy separate ranks. In 1, 1, 2, the 2nd smallest is 1, not 2.
- Non-integer n: You cannot ask for the 2.5th smallest. Use interpolation if you need a fractional rank (like a percentile).
Limitations of the Formula
The nth smallest value is a simple order statistic. It does not tell you anything about the distribution of the other values – only the value at that exact position. For example, the 5th smallest in a list of 100 could be very close to the minimum or far from it. The formula assumes the list is finite and fully known; it does not work for infinite sequences or streaming data without storing all values.
If you need to find the nth smallest in a very large dataset, sorting the entire list may be inefficient. Algorithms like quickselect can find the nth smallest in O(m) average time without fully sorting, but the result is identical to sorting and picking the nth element.
Alternatives and Related Measures
- Minimum (1st smallest): The smallest value in the list.
- Maximum (mth smallest): The largest value.
- Median: The middle value; for even m, the average of the two middle values.
- Quartiles: The 25th, 50th, and 75th percentiles, which are specific nth smallest values.
- Percentiles: The value below which a given percentage of the data falls.
If you need the nth largest, simply compute the (m – n + 1)th smallest.
Frequently Asked Questions
What is the difference between nth smallest and nth lowest?
They are exactly the same. “Smallest” and “lowest” both refer to the same ordering from the minimum upward.
How do I find the nth smallest in Excel?
Use the SMALL function: =SMALL(range, n). For example, =SMALL(A1:A10, 3) returns the 3rd smallest value in cells A1 through A10.
What if my list has text or blank cells?
This calculator only accepts numbers. In Excel, the SMALL function ignores text and logical values, but blanks are treated as 0 if included. Remove non-numeric entries before using this calculator.
Can I use this to find the median?
Yes, for an odd number of values, the median is the ((m+1)/2)th smallest. For an even number, the median is the average of the (m/2)th and (m/2 + 1)th smallest values.
What does “n” have to be?
n must be a positive integer between 1 and the total number of values in the list. If n is larger than the list length, the calculator cannot return a result.
Related
Formula used
in list | List of numbers | 8, 3, 10, 1, 6 | 0 in n | Rank n | 2 | 1 out result | nth smallest value | sort(list)[n-1] | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.