  It is well-known that the associated analytic space of an affine variety
defined over $\mathbb{C}$ is Stein but the converse is not true, that is, an
algebraic Stein variety is not necessarily affine. In this paper, we give
sufficient and necessary conditions for an algebraic Stein variety to be
affine. One of our results is that an irreducible quasi-projective variety $Y$
defined over $\mathbb{C}$ with dimension $d$ ($d\geq 1$) is affine if and only
if $Y$ is Stein, $H^i(Y, {\mathcal{O}}_Y)=0$ for all $i>0$ and $\kappa(D, X)=
d$ (i.e., $D$ is a big divisor), where $X$ is a projective variety containing
$Y$ and $D$ is an effective divisor with support $X-Y$. If $Y$ is algebraic
Stein but not affine, we also discuss the possible transcendental degree of the
nonconstant regular functions on $Y$. We prove that $Y$ cannot have $d-1$
algebraically independent nonconstant regular functions. The interesting
phenomenon is that the transcendental degree can be even if the dimension of
$Y$ is even and the degree can be odd if the dimension of $Y$ is odd.
