As an extension of Ozeki's inequality we give an inequality which estimates the difference \begin{equation*} \sum_{k=1}^n p_k a_k^2\sum_{k=1}^n p_k b_k^2 - (\sum_{k=1}^n p_k a_k b_k)^2 \end{equation*} derived from the weighted Cauchy-Schwartz inequality for $n$-tuples $a = (a_1, ..., a_n),\ b = (b_1, ..., b_n)$ and $p = (p_1, ..., p_n)$ of positive numbers under certain conditions. We discuss the upper bound of the difference not only in the general case but also in the special cases that $a$ and $b$ are monotonic in the opposite sense and in the same sense.