A rotary electric machine includes a rotor core in which first magnetic pole portions having permanent magnets and second magnetic pole portions having no permanent magnets are alternately arranged in a circumferential direction; and a stator core which is arranged to face an outer periphery of the rotor core. The rotor core is configured such that an average gap length between the stator core and the second magnetic pole portions is larger than an average gap length between the stator core and the first magnetic pole portions.