In this paper, we discuss the equation of state for nonlinear spinor gases in the context of cosmology. The mean energy momentum tensor is similar to that of the prefect fluid, but an additional function of state $W$ is introduced to describe the nonlinear potential. The equation of state $w(a)lesssim -1$ in the early universe is calculated, which provides a natural explanation for the negative pressure of dark matter and dark energy. $W$ may be also the main origin of the cosmological constant $Lambda$. So the nonlinear spinor gases may be a candidate for dark matter and dark energy.