The ability to gain insights into the 3D properties of artificial or biological systems is often critical. However, 3D structures are difficult to retrieve at low dose and with extremely fast processing, as most techniques are based on acquiring and computing hundreds of 2D angular projections. This is even more challenging with ultrashort X-rays which allow realizing nanometre scale studies and ultrafast time resolved 2D movies. Here we show that computer stereo vision concepts can be transposed to X-rays. We demonstrate nanoscale three-dimensional reconstruction from a single ultrafast acquisition. Two diffraction patterns are recorded simultaneously on a single CCD camera and after phase retrieval two stereo images are reconstructed. A 3D representation of the sample is then computed from quantitative disparity maps with about 130x130x380nm3 voxel resolution in a snapshot of 20 femtoseconds. We extend our demonstration to phase contrast X-ray stereo imaging and reveal hidden 3D features of a sample. Computed phase stereo imaging will find scientific applications at X-ray free electron lasers, synchrotrons and laser-based sources, but also in fast industrial and medical 3D diagnostics.