A rotating electrical machine comprising a cylindrical housing having a flow path (24,29) configured to allow a refrigerant to flow therethrough, an inlet (δ) configured to allow the refrigerant to flow into the flow path (24,29), and an outlet (β) configured to allow the refrigerant to flow out of the flow path (24,29), the flow path (24,29) being formed so as to spirally surround a circumferential surface of the housing, wherein the flow path (24,29) includes: a first flow path (51,91) that is formed along one end surface of the housing and formed such that a width along the circumferential surface increases along a flow direction of the refrigerant from the inlet; a second flow path (52,92) that is formed along the other end surface of the housing and formed such that a width along the circumferential surface decreases toward the outlet along the flow direction of the refrigerant; and a third flow path (53,93) having a uniform width between the first flow path and the second flow path, and a width of the third flow path (53,93) is narrower than a width of a widest portion of the first flow path (51,91) and narrower than a width of a widest portion of the second flow path (51,92), wherein the rotating electrical machine includes: the cylindrical housing, which is a first housing that accommodates a first stator and a first rotor and has the flow path; a second housing that accommodates a second stator and a second rotor and has the flow path; and a coupling pipe that linearly couples the outlet of the first housing and the inlet of the second housing, wherein the flow path of the second housing is formed in a spiral shape that is wound in a reverse direction with respect to the flow path of the first housing. a first flow path (51,91) that is formed along one end surface of the housing and formed such that a width along the circumferential surface increases along a flow direction of the refrigerant from the inlet; a second flow path (52,92) that is formed along the other end surface of the housing and formed such that a width along the circumferential surface decreases toward the outlet along the flow direction of the refrigerant; and a third flow path (53,93) having a uniform width between the first flow path and the second flow path, and a width of the third flow path (53,93) is narrower than a width of a widest portion of the first flow path (51,91) and narrower than a width of a widest portion of the second flow path (51,92), wherein the rotating electrical machine includes: the cylindrical housing, which is a first housing that accommodates a first stator and a first rotor and has the flow path; a second housing that accommodates a second stator and a second rotor and has the flow path; and a coupling pipe that linearly couples the outlet of the first housing and the inlet of the second housing, wherein the flow path of the second housing is formed in a spiral shape that is wound in a reverse direction with respect to the flow path of the first housing. the cylindrical housing, which is a first housing that accommodates a first stator and a first rotor and has the flow path; a second housing that accommodates a second stator and a second rotor and has the flow path; and a coupling pipe that linearly couples the outlet of the first housing and the inlet of the second housing, wherein the flow path of the second housing is formed in a spiral shape that is wound in a reverse direction with respect to the flow path of the first housing.