Recent analyses of data from the NASA Kepler spacecraft have established that planets with radii within 25 per cent of the Earth’s are commonplace throughout the Galaxy, orbiting at least 16.5 per cent of Sun-like stars. Because these studies were sensitive to the sizes of the planets but not their masses, the question remains whether these Earth-sized planets are indeed similar to the Earth in bulk composition. The smallest planets for which masses have been accurately determined are Kepler-10b (1.42 Earth radii) and Kepler-36b (1.49 Earth radii), which are both significantly larger than the Earth. Recently, the planet Kepler-78b was discovered and found to have a radius of only 1.16 Earth radii. Here we report that the mass of this planet is 1.86 Earth masses. The resulting mean density of the planet is 5.57 g cm−3, which is similar to that of the Earth and implies a composition of iron and rock.