A magnetic sensor includes a light flux emitting unit, a first cell onto which a light flux, which propagates in a first direction, is incident and that accommodates a medium which changes optical characteristics of the light flux depending on a magnitude of a magnetic field, a first light flux bender that bends some of the plurality of light fluxes in a second direction different from the first direction, a second cell onto which the light flux, which is bent in the second direction in the first light flux bender, is incident and that accommodates a medium which changes optical characteristics of the light flux depending on the magnitude of the magnetic field, a first light detection element that detects optical characteristics of the light flux emitted from the first cell, and a second light detection element that detects optical characteristics of the light flux emitted from the second cell.