An optical analyzer for analyzing a sample flowing through a pipe (H) having translucency, the optical analyzer comprising: a pipe (H) 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 (S) allowing the light detection unit to detect the light of the light source unit passing through the pipe (H) and a reference measurement position (R) allowing the light detection unit to detect the light of the light source unit without passing through the pipe (H) and wherein the light path length is kept the same between the sample measurement position (S) and the reference measurement position (R), 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 (R), 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 (R) substantially the same as a focal position when the light passing through the pipe (H) is condensed by the condenser lens of the light detection unit . a pipe (H) 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 (S) allowing the light detection unit to detect the light of the light source unit passing through the pipe (H) and a reference measurement position (R) allowing the light detection unit to detect the light of the light source unit without passing through the pipe (H) and wherein the light path length is kept the same between the sample measurement position (S) and the reference measurement position (R), 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 (S) allowing the light detection unit to detect the light of the light source unit passing through the pipe (H) and a reference measurement position (R) allowing the light detection unit to detect the light of the light source unit without passing through the pipe (H) and wherein the light path length is kept the same between the sample measurement position (S) and the reference measurement position (R), 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 (R), 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 (R) substantially the same as a focal position when the light passing through the pipe (H) is condensed by the condenser lens of the light detection unit . <EOS>