Star-forming gas clouds are strongly magnetized, and their ionization fractions are high enough to place them close to the regime of ideal magnetohydrodyamics on all but the smallest size scales. In this review we discuss the effects of magnetic fields on the star formation rate (SFR) in these clouds, and on the mass spectrum of the fragments that are the outcome of the star formation process, the stellar initial mass function (IMF). Current numerical results suggest that magnetic fields by themselves are minor players in setting either the SFR or the IMF, changing star formation rates and median stellar masses only by factors of ∼ 2−3 compared to non-magnetized flows. However, the indirect effects of magnetic fields, via their interaction with star formation feedback in the form of jets, photoionization, radiative heating, and supernovae, could have significantly larger effects. We explore evidence for this possibility in current simulations, and suggest avenues for future exploration, both in simulations and observations.