According to the present invention, the moving direction of a rotor with respect to a stator is set as a first direction (an X-arrow direction), the direction in which the stator and the rotor face each other is set as a second direction (a Y-arrow direction), and a direction perpendicular to both the first direction (the X-arrow direction) and the second direction (the Y-arrow direction) is set as a third direction (a Z-arrow direction). This rotary electric machine is provided with: a first reference portion (41) in which at least one among the stator and the rotor serves as a skew reference; and a continuous skew portion (42) which is gradually skewed in the first direction (the X-arrow direction) from the first reference portion (41), and disposed in the third direction (the Z-arrow direction). The maximum value is set for the amount of skew of the continuous skew portion (42) with respect to the first reference portion (41) so that the maximum value of the relative amount of skew between the stator and the rotor corresponds to the pitch of one slot among a plurality of slots (21c).