Quartiles for ungrouped data
Quartiles are the values of arranged data which divide whole data into four equal parts. They are 3 in numbers namely $Q_1$, $Q_2$ and $Q_3$. Here $Q_1$ is first quartile, $Q_2$ is second quartile and $Q_3$ is third quartile.
Formula
The formula for $i^{th}$ quartile is
$Q_i =$ Value of $\bigg(\dfrac{i(N+1)}{4}\bigg)^{th}$
observation, $i=1,2,3$
where $N$ is the total number of observations.