It actually depends on which bit of the Sun you’re talking about. Because the Sun is an enormous mass of gas without any solid surface, it spins very differently from a solid object like the Earth – an effect that scientists call ‘differential rotation’. This makes the equator rotate roughly once every 25 days, middle latitudes in both hemispheres roughly once every 27 days, and polar areas once every 30-36 days. Once you get deep enough inside the Sun, however, the gas is so dense that it behaves like a solid body, and rotates once every 27 days or so.
Answered by Giles Sparrow