An encoder comprising: a scale including an origin detecting pattern; an origin detector reading the origin detecting pattern; and a processor outputting an origin signal, wherein the origin detector includes a plurality of detecting element groups, each detecting element group includes at least a first detector, a second detector, a third detector, and a fourth detector, the origin detector is configured so that a first signal sensitivity of the detectors distributed at a center is larger than a second signal sensitivity of the detectors distributed at a periphery, the origin detecting pattern includes an origin pattern, where a length along a detecting direction of a part, which is detected by the origin detector and has a physical characteristic different from an origin peripheral part, is larger than a length along the detecting direction of each detecting element group, the origin detector outputs a first signal based on the first and third detectors, and a second signal based on the second and fourth detectors, and the processor acquires a third signal by processing the first signal and a first threshold, and a fourth signal by processing the second signal and a second threshold, and outputs a fifth signal acquired by processing the third and fourth signals as the origin signal, characterized in that the origin detecting pattern is configured so that a ratio of variation of a physical characteristic relative to a detecting direction of an end of the origin detecting pattern set as an origin position is larger than a ratio of variation of a physical characteristic relative to a detecting direction of an end of the origin detecting pattern other than the origin position. a scale including an origin detecting pattern; an origin detector reading the origin detecting pattern; and a processor outputting an origin signal, wherein the origin detector includes a plurality of detecting element groups, each detecting element group includes at least a first detector, a second detector, a third detector, and a fourth detector, the origin detector is configured so that a first signal sensitivity of the detectors distributed at a center is larger than a second signal sensitivity of the detectors distributed at a periphery, the origin detecting pattern includes an origin pattern, where a length along a detecting direction of a part, which is detected by the origin detector and has a physical characteristic different from an origin peripheral part, is larger than a length along the detecting direction of each detecting element group, the origin detector outputs a first signal based on the first and third detectors, and a second signal based on the second and fourth detectors, and the processor acquires a third signal by processing the first signal and a first threshold, and a fourth signal by processing the second signal and a second threshold, and outputs a fifth signal acquired by processing the third and fourth signals as the origin signal, characterized in that the origin detecting pattern is configured so that a ratio of variation of a physical characteristic relative to a detecting direction of an end of the origin detecting pattern set as an origin position is larger than a ratio of variation of a physical characteristic relative to a detecting direction of an end of the origin detecting pattern other than the origin position.