Kepler’s third law for the Earth’s (nearly circular) orbit is T2=GMS4π2a3, from which
MS=GT24π2a3
Convert the period: T=1 year≈365⋅86400≈3,15⋅107 s. Substitute a=1,5⋅1011 m and G=6,67⋅10−11:
MS=6,67⋅10−11(3,15⋅107)24π2(1,5⋅1011)3=6,67⋅10−11⋅9,92⋅101439,5⋅3,38⋅1033
MS=6,62⋅1041,33⋅1035≈2⋅1030 kg
The accepted value is 1,99⋅1030 kg: the estimate from Kepler’s third law alone is excellent.
MS≈2⋅1030 kg