X-ray tomography is an invaluable tool in biomedical imaging. It can deliver the three-dimensional internal structure of entire organisms as well as that of single cells, and even gives access to quantitative information, crucially important both for medical applications and for basic research. Most frequently such information is based on X-ray attenuation. Phase contrast is sometimes used for improved visibility but remains significantly harder to quantify. Here we describe an X-ray computed tomography technique that generates quantitative high-contrast three-dimensional electron density maps from phase contrast information without reverting to assumptions of a weak phase object or negligible absorption. This method uses a ptychographic coherent imaging approach to record tomographic data sets, exploiting both the high penetration power of hard X-rays and the high sensitivity of lensless imaging. As an example, we present images of a bone sample in which structures on the 100 nm length scale such as the osteocyte lacunae and the interconnective canalicular network are clearly resolved. The recovered electron density map provides a contrast high enough to estimate nanoscale bone density variations of less than one per cent. We expect this high-resolution tomography technique to provide invaluable information for both the life and materials sciences.