Confocal imaging by a parallel-mode confocal microscope is based on the real-time incoherent-holography technique. Besides the image amplitude, the image phase is inherently reconstructed. In this paper we prove that the phase image component can be converted into the height map, and, in this way, we measure the surface profile with the precision of several nanometers. Small height differences can be measured inside one optical section of the specimen surface, while the measurement of large differences needs to connect more optical sections. The two procedures are demonstrated experimentally even for the surface with large and steep height changes. The ambiguity in the height determination from the image phase component is overcome by means of the depth discrimination property of the microscope. The axial resolution is improved using broadband illumination.