A magnetic thin film has a layer which is formed of an alloy having a ordered crystal structure whose composition formula is represented by XYZ or X2YZ (where X is one or more than one of the elements selected from the group consisting of Co, Ir, Rh, Pt, and Cu, Y is one or more than one of the elements selected from the group consisting of V, Cr, Mn, and Fe, and Z is one or more than one of the elements selected the group consisting of Al, Si, Ge, As, Sb, Bi, In, Ti, and Pb). The alloy contains at least one additive element which is not included in the composition formula of the alloy and which has a Debye temperature that is equal to or less than 300K.