A level detector includes a light receiving element unit having a plurality of light receiving elements; a first amplifier circuit configured to amplify a light receiving signal; a first gain switching circuit; a first peak hold circuit; an arithmetic control device configured to analyze a light receiving position of the position detection unit; a second amplifier circuit; and a second gain switching circuit configured to switch and set a gain of the second amplifier circuit, the arithmetic control device analyzes the light receiving position of laser light received by the position detection unit, based on a signal output from the second amplifier circuit.