An encoder includes an electrically conductive reference scale having surface steps formed at predetermined positions; an electrically conductive probe having a tip disposed opposed to the reference scale; wherein the reference scale and the probe are relatively movable in a direction different from the opposing direction of the tip of the probe and the reference scale; a portion for applying an electric voltage to between the reference scale and the probe, a portion for detecting a change in a tunnel current between the reference scale and the probe, to between which the electric voltage is applied by the voltage applying portion at the time of the relative movement between the scale and the probe, the detecting portion detecting the change in the tunnel current when the probe passes a position opposed to a surface step of the reference scale; and portion for detecting the amount of the relative movement between the scale and probe, on the basis of the detection by the change detecting portion.