# Quartile Calculator

Instructions: This quartile calculator will calculate a quartile you specify, showing step-by-step calculations, for a sample data set you specify in the form below:

Type the sample (comma or space separated)
Quartile (1, 2 or 3) =
Name of the variable (Optional) =

The k-th quartile (first, second or third quartile) of a distribution corresponds to a point with the property that 25% of the distribution is to the left of the first quartile ($$Q_1$$), 50% of the distribution is to the left of the second quartile ($$Q_2$$) and 75% of the distribution is to the left of the third quartile ($$Q_3$$)

### How to Compute a Quartile?

In the case of sample data, which means that you DON'T HAVE all the values of the population, you only have a sample, the quartiles can be only estimated.

In order to do so, the sample data is first organized in ascending order. Then, the position of the k-th quartile $$Q_k$$ is computed using the formula:

$L_k = \frac{(n+1) k}{4}$

where $$n$$ is the sample size, and $$k$$ is the corresponding order of the quartile ($$k$$ = 1, 2 or 3).

• If $$L_k$$ is an integer number, then the quartile $$Q_k$$ is the value located in the position $$L_k$$ of the data organized in ascending order.

• If $$L_k$$ is NOT integer number, then we need to find the two closest integer positions $$L_{low}$$ and $$L_{high}$$ so that $$L_{low} < L_k < L_{high}$$. For example, if $$L_P = 5.25$$, then $$L_{low} = 5$$ and $$L_{high} = 6$$.

Then, after we have found $$L_{low}$$ and $$L_{high}$$ we locate the values in the ascending array in positions $$L_{low}$$ and $$L_{high}$$, and we call them $$Q_{low}$$ and $$Q_{high}$$ respectively, and we estimate (interpolate) the quartile $$Q_k$$ as:

$Q_k = Q_{low} + (L_k -L_{low})\times(Q_{high} - Q_{low})$

### Quartile calculator excel

Some confusion occurs when people uses Excel to compute quartiles using the formula "=QUARTILE(data, k)", because the above formula does not always coincide with the result given by Excel. So what is going on? What happens is that Excel uses an oversimplified form of interpolating when the percentile position is not exact.

The interpolation formula above is more precise than what Excel uses, but yet, linear interpolation is one possible approximation.

Actually, different statistical programs use different ways of computing quartiles. For example, Excel spits out a different value than Mintab or SPSS do. Indeed, SPSS and Minitab use the interpolation formula shown above.

### Why should I use this calculator instead of a statistical software?

You can use a statistical software if you want, but this quartile calculator shows work, making clear all steps required.

If instead of computing quartiles you need a general percentile, you can use this percentile calculator.

Another type of special percentile calculator is our decile calculator, which is specific for deciles.

In case you have any suggestion, or if you would like to report a broken solver/calculator, please do not hesitate to contact us.