A height detection apparatus configured to detect a height of a target object, comprising: a light source configured to emit white light; a two-beam interference objective lens configured to divide white light emitted from the light source into two light beams, apply one of the two light beams to the target object and the other light beam to a reference surface, and cause interference between reflected light from the target object and reflected light from the reference surface to obtain interference light; an imaging device configured to capture an image of interference light obtained by the two-beam interference objective lens; a Z stage configured to move the two-beam interference objective lens relative to the target object in an optical axis direction; and a control device configured to control the light source, the imaging device, and the Z stage to obtain a height of the target object, the control device being configured, during movement of the two-beam interference objective lens relative to the target object in the optical axis direction, to: (i) successively change brightness of the white light in first to K-th levels at certain predetermined positions of the Z stage and capture an image of the interference light, wherein the brightness of white light is set in accordance with the properties of the target object and the vicinity thereof; (ii) detect, as a focus position, a position of the Z stage where intensity of the interference light is highest in a period during which the brightness of the white light is set to the k-th level, for each pixel of the captured image; and (iii) obtain the height of the target object, based on a detection result, where K is an integer equal to or greater than two, and k is any integer from 1 to K. a light source configured to emit white light; a two-beam interference objective lens configured to divide white light emitted from the light source into two light beams, apply one of the two light beams to the target object and the other light beam to a reference surface, and cause interference between reflected light from the target object and reflected light from the reference surface to obtain interference light; an imaging device configured to capture an image of interference light obtained by the two-beam interference objective lens; a Z stage configured to move the two-beam interference objective lens relative to the target object in an optical axis direction; and a control device configured to control the light source, the imaging device, and the Z stage to obtain a height of the target object, the control device being configured, during movement of the two-beam interference objective lens relative to the target object in the optical axis direction, to: (i) successively change brightness of the white light in first to K-th levels at certain predetermined positions of the Z stage and capture an image of the interference light, wherein the brightness of white light is set in accordance with the properties of the target object and the vicinity thereof; (ii) detect, as a focus position, a position of the Z stage where intensity of the interference light is highest in a period during which the brightness of the white light is set to the k-th level, for each pixel of the captured image; and (iii) obtain the height of the target object, based on a detection result, where K is an integer equal to or greater than two, and k is any integer from 1 to K. (i) successively change brightness of the white light in first to K-th levels at certain predetermined positions of the Z stage and capture an image of the interference light, wherein the brightness of white light is set in accordance with the properties of the target object and the vicinity thereof; (ii) detect, as a focus position, a position of the Z stage where intensity of the interference light is highest in a period during which the brightness of the white light is set to the k-th level, for each pixel of the captured image; and (iii) obtain the height of the target object, based on a detection result, where K is an integer equal to or greater than two, and k is any integer from 1 to K.