A magnetic sensor includes a plurality of assemblies combined. Each assembly includes a plurality of tunnel magnetoresistive elements, a capacitor and a fixed resistor. The tunnel magnetoresistive dements are (i) disposed in such a way that fixed magnetization directions of fixed magnetic layers are substantially identical and changeable magnetization directions of free magnetic layers with no magnetic field applied are substantially identical and (ii) connected to each other in series-parallel. The capacitor is connected in parallel to the tunnel magnetoresistive elements. The fixed resistor is connected in series to the tunnel magnetoresistive elements and to the capacitor. The assemblies are (i) disposed in such a way that the fixed magnetization directions of the fixed magnetic layers of the assemblies have a relative angle of more than 90 degrees and (ii) connected to each other in series and/or in parallel.