Since 1995, more than 500 exoplanets have been detected using different techniques, of which 11 were detected with gravitational microlensing. Most of these are gravitationally bound to their host stars. There is some evidence of free-floating planetary mass objects in young star-forming regions, but these objects are limited to massive objects of 3 to 15 Jupiter masses with large uncertainties in photometric mass estimates and their abundance. Here, we report the discovery of a population of unbound or distant Jupiter-mass objects, which are almost twice (1.8_{-0.8}^{+1.7}) as common as main-sequence stars, based on two years of gravitational microlensing survey observations toward the Galactic Bulge. These planetary-mass objects have no host stars that can be detected within about ten astronomical units by gravitational microlensing. However a comparison with constraints from direct imaging suggests that most of these planetary-mass objects are not bound to any host star. An abrupt change in the mass function at about a Jupiter mass favours the idea that their formation process is different from that of stars and brown dwarfs. They may have formed in proto-planetary disks and subsequently scattered into unbound or very distant orbits.