You can use Kepler's third law to calculate the mass of the Sun using data for the Earth:
Write the Kepler's third law as:
GM/4π² = r³/T².
Multiply by 4π²/G to get:
M = 4r³π²/T²G.
Insert T for Earth as 1 year and r as 1 au.
The mass of the Sun is about 2×10³⁰ kg.
Read more