We used field-theoretic simulations to study the equilibrium behavior of a polymer solution under good solvent conditions confined to a slit of width L. In particular, we obtained the chemical potential and the density profiles across the slit for different values of the monomer excluded volume over a wide range of concentrations C. We also obtained mean field results for the chemical potential and the density profiles. The effective correlation length ξeff was calculated from the density profiles and compared to the mean field result (valid in the limit of high concentrations). For small excluded volume parameters we found that ξeff is well described by the mean field result for all concentrations. For larger excluded volume parameters the correlation length exhibits a C−3/4 scaling behavior for intermediate concentrations, which is compatible with the behavior expected for this system in the semidilute regime.