Why do planets have different rotational periods?

We all know that the solar system was formed from a nebula of gas and dust. But why is it that the earth has a period of 24 hours to rotate on its axis and why does the sun take 27 days to complete a rotation.

How is this so? if the momentum from the nebula is to be conserved then why sun has longer period and Earth have lesser period? Lets take an example. Lets say the nebula had a velocity of 10 km/s so the sun used up 99.8% of this nebula so its velocity will have to be 10 km/s roughly. Now lets say the mass of the nebula left behind after sun was formed through which planets formed in our solar system which was 0.1% of the nebula. Lets say the mass of the nebula from which planets formed was 10 kg and its speed was 10 km/s. So momentum would be 100 kg km/s. Now momentum has to be conserved on Earth.

So lets say the mass (The mass of nebula that earth got) was 1 kg and the speed would have to be 100 km/s in order to conserve momentum.

I think this proves as to why earth spins faster than the sun. Please clarify this insight.

• That is not how conservation of angular momentum works, remember that if the distance to the center changes the speed has to change too – user126422 Mar 18 '17 at 15:44
• Many other factors play into rotational period than simply mass. This approach cannot explain why Venus has a retrograde rotation, why Neptune rotates almost perpendicular to its orbit, or why Earth spins at 1/27 the speed of the sun with only 1/10000 its mass. – Asher Mar 18 '17 at 15:52
• -1. Lack of research. See eg How do the Planets and Sun get their initial spin? and links therein. – sammy gerbil Mar 18 '17 at 17:04
• @sammygerbil -- Several problems: One is that the accepted answer to that question is quite incorrect. Others: That question does not address the slow rotation of the Sun or the so-called "angular momentum" problem, which is that while almost all of the mass of the solar system is in the Sun, most of the solar system's angular momentum is in the orbits and rotations of the planets. – David Hammen Mar 19 '17 at 2:56
• Much more closely related: Where does a star's angular momentum go as its spin slows down? – David Hammen Mar 19 '17 at 3:04