A magnetic sensor have a magnetic field sensing portion having an alloy metal thin film including Ni, Fe and Co as main components and having a magneto-resistance effect, and detects two or more magnetic fields, at least one of which magnetic fields to be detected is 2.5 mT or more, and among which magnetic fields to be detected the minimum magnetic field and the maximum magnetic field are separated by 0.5 mT or more. The alloy metal thin film has an absolute value of magneto-striction constant of 1.5×10−5 or less, an anisotropic magnetic field of 8 Oe or more as well as 16 Oe or less, and a magnetic resistance change ratio of 2.5% or more. The alloy metal thin film is within a composition range which concurrently fulfills the following relations: 21x+19y≦1869, 5x+28y≧546, y≦11, and x+y≧85, where the composition ratio of Ni is represented by x % by weight, while the composition ratio of Co is represented by y % by weight.