An optical analyzer for analyzing a sample flowing through a pipe having translucency, the optical analyzer comprising: a pipe having translucency through which, in use, a sample flows; a light source unit that has a light source and a condenser lens; a light detection unit that has a condenser lens and that is configured to detect light of the light source unit; and a support mechanism that is configured to movably support the light source unit and the light detection unit, wherein the support mechanism is configured to move the light source unit and the light detection unit between a sample measurement position allowing the light detection unit to detect the light of the light source unit passing through the pipe and a reference measurement position allowing the light detection unit to detect the light of the light source unit without passing through the pipe and wherein the light path length is kept the same between the sample measurement position and the reference measurement position, the analyzer being characterized in that it further comprises a reference optical member positioned between the light source unit and the light detection unit in the reference measurement position, wherein the reference optical member is an optical element that is configured to change the focal position of the light of the light source unit so as to make a focal position in the reference measurement position substantially the same as a focal position when the light passing through the pipe is condensed by the condenser lens of the light detection unit. a pipe having translucency through which, in use, a sample flows; a light source unit that has a light source and a condenser lens; a light detection unit that has a condenser lens and that is configured to detect light of the light source unit; and a support mechanism that is configured to movably support the light source unit and the light detection unit, wherein the support mechanism is configured to move the light source unit and the light detection unit between a sample measurement position allowing the light detection unit to detect the light of the light source unit passing through the pipe and a reference measurement position allowing the light detection unit to detect the light of the light source unit without passing through the pipe and wherein the light path length is kept the same between the sample measurement position and the reference measurement position, the analyzer being characterized in that it further comprises the support mechanism is configured to move the light source unit and the light detection unit between a sample measurement position allowing the light detection unit to detect the light of the light source unit passing through the pipe and a reference measurement position allowing the light detection unit to detect the light of the light source unit without passing through the pipe and wherein the light path length is kept the same between the sample measurement position and the reference measurement position, the analyzer being characterized in that it further comprises a reference optical member positioned between the light source unit and the light detection unit in the reference measurement position, wherein the reference optical member is an optical element that is configured to change the focal position of the light of the light source unit so as to make a focal position in the reference measurement position substantially the same as a focal position when the light passing through the pipe is condensed by the condenser lens of the light detection unit.