An optical potentiometer includes a metal pipe having one end closed, a metal pipe that has a relationship of a nested structure with respect to the metal pipe and guides the metal pipe movably in a longitudinal direction, a light source and an optical fiber which supply light into the metal pipe, and an optical power meter that detects a change in the amount of reflected light from inside the metal pipe. The metal pipe has a slit along the longitudinal direction. The optical power meter detects a change in the amount of reflected light from inside the metal pipe caused by a change in the opening amount of the slit caused in accordance with the movement of the metal pipe in the longitudinal direction.