We combine results from imaging searches for substellar objects in the \sigma Orionis cluster and follow-up photometric and spectroscopic observations to derive a census of the brown dwarf population in a region of 847 arcmin ^ { 2 } . We identify 64 very low-mass cluster member candidates in this region . We have available three color ( I Z and J ) photometry for all of them , spectra for 9 objects , and K photometry for 27 % of our sample . These data provide a well defined sequence in the I versus I - J , I - K color magnitude diagrams , and indicate that the cluster is affected by little reddening despite its young age ( \sim 5 Myr ) . Using state-of-the-art evolutionary models , we derive a mass function from the low-mass stars ( 0.2 M _ { \odot } ) across the complete brown dwarf domain ( 0.075 M _ { \odot } to 0.013 M _ { \odot } ) , and into the realm of free-floating planetary-mass objects ( \leq 0.013 M _ { \odot } ) . We find that the mass spectrum ( dN / dm ) \propto m ^ { - \alpha } increases toward lower masses with an exponent \alpha = 0.8 \pm 0.4 . Our results suggest that planetary-mass isolated objects could be as common as brown dwarfs ; both kinds of objects together would be as numerous as stars in the cluster . If the distribution of stellar and substellar masses in \sigma Orionis is representative of the Galactic disk , older and much lower luminosity free-floating planetary-mass objects with masses down to about 0.005 M _ { \odot } should be abundant in the solar vicinity , with a density similar to M-type stars .