  A set of lines in $\mathbb{R}^n$ is called equiangular if the angle between
each pair of lines is the same. We derive new upper bounds on the cardinality
of equiangular lines. Let us denote the maximum cardinality of equiangular
lines in $\mathbb{R}^n$ with the common angle $\arccos \alpha$ by
$M_{\alpha}(n)$. We prove that $M_{\frac 1 a} (n) \leq \frac 1 2 ( a^2-2) (
a^2-1)$ for any $n \in \mathbb{N}$ in the interval $a^2 -2 \leq n \leq 3
a^2-16$ and $a \geq 3$. Moreover, we discuss the relation between equiangular
lines and spherical two-distance sets and we obtain the new results on the
maximum spherical two-distance sets in $\mathbb{R}^n$ up to $n \leq 417$.
