  We study the behavior of the smallest possible constants $d(a,b)$ and $d_n$
in Hardy's inequalities $$
\int_a^b\left(\frac{1}{x}\int_a^xf(t)dt\right)^2\,dx\leq d(a,b)\,\int_a^b
[f(x)]^2 dx $$ and $$
\sum_{k=1}^{n}\Big(\frac{1}{k}\sum_{j=1}^{k}a_j\Big)^2\leq
d_n\,\sum_{k=1}^{n}a_k^2. $$ The exact constant $d(a,b)$ and the precise rate
of convergence of $d_n$ are established and the extremal function and the
``almost extremal'' sequence are found.
