A shape measuring apparatus includes a cylindrical flexible body and a bend detection sensor. The sensor includes an optical fiber extending along the flexible body, a detection target to vary characteristics of detection light guided through the optical fiber in accordance with a curvature of the optical fiber, and a light detection unit to detect the detection light. The shape measuring apparatus also includes a shape calculating device to calculate a bend shape of the flexible body, based on the variation of the characteristics of the detection light, a cylindrical sheathing member sheathing a part of the optical fiber in the flexible body, and a hard distal member provided at a distal end of the flexible body and holding a distal end of the sheathing member.