We study the virial expansion for three-dimensional Bose and Fermi gases at finite temperature using an approximation that only considers two-body processes and is valid for high temperatures and low densities. The first virial coefficients are computed and the second is exact. The results are obtained for the full range of values of the scattering length and the unitary limit is recovered as a particular case. A weak coupling expansion is performed and the free case is also obtained as a proper limit. The influence of an anisotropic harmonic trap is considered using the Local Density Approximation - LDA, analytical results are obtained and the special case of the isotropic trap is discussed in detail.