|In SI base units||(1.98847±0.00007)×1030 kg |
The solar mass (M☉) is a standard unit of mass in astronomy, equal to approximately 2×1030 kg. It is often used to indicate the masses of other stars, as well as stellar clusters, nebulae, galaxies and black holes. It is approximately equal to the mass of the Sun. This equates to about two nonillion ( short scale), two quintillion ( long scale) kilograms or 2000 quettagrams:
The value of the gravitational constant was first derived from measurements that were made by Henry Cavendish in 1798 with a torsion balance.  The value he obtained differs by only 1% from the modern value, but was not as precise.  The diurnal parallax of the Sun was accurately measured during the transits of Venus in 1761 and 1769,  yielding a value of 9″ (9 arcseconds, compared to the present value of 8.794148″). From the value of the diurnal parallax, one can determine the distance to the Sun from the geometry of Earth.  
The first known estimate of the solar mass was by Isaac Newton.  In his work Principia (1687), he estimated that the ratio of the mass of Earth to the Sun was about 1⁄28700. Later he determined that his value was based upon a faulty value for the solar parallax, which he had used to estimate the distance to the Sun. He corrected his estimated ratio to 1⁄169282 in the third edition of the Principia. The current value for the solar parallax is smaller still, yielding an estimated mass ratio of 1⁄332946. 
As a unit of measurement, the solar mass came into use before the AU and the gravitational constant were precisely measured. This is because the relative mass of another planet in the Solar System or the combined mass of two binary stars can be calculated in units of Solar mass directly from the orbital radius and orbital period of the planet or stars using Kepler's third law.
The mass of the Sun cannot be measured directly, and is instead calculated from other measurable factors, using the equation for the orbital period of a small body orbiting a central mass.  Based on the length of the year, the distance from Earth to the Sun (an astronomical unit or AU), and the gravitational constant (G), the mass of the Sun is given by solving Kepler's third law:  
The value of G is difficult to measure and is only known with limited accuracy (see Cavendish experiment). The value of G times the mass of an object, called the standard gravitational parameter, is known for the Sun and several planets to a much higher accuracy than G alone.  As a result, the solar mass is used as the standard mass in the astronomical system of units.
The Sun is losing mass because of fusion reactions occurring within its core, leading to the emission of electromagnetic energy, neutrinos and by the ejection of matter with the solar wind. It is expelling about (2–3)×10−14 M☉/year.  The mass loss rate will increase when the Sun enters the red giant stage, climbing to (7–9)×10−14 M☉/year when it reaches the tip of the red-giant branch. This will rise to 10−6 M☉/year on the asymptotic giant branch, before peaking at a rate of 10−5 to 10−4 M☉/year as the Sun generates a planetary nebula. By the time the Sun becomes a degenerate white dwarf, it will have lost 46% of its starting mass. 
The mass of the Sun has been decreasing since the time it formed. This occurs through two processes in nearly equal amounts. First, in the Sun's core, hydrogen is converted into helium through nuclear fusion, in particular the p–p chain, and this reaction converts some mass into energy in the form of gamma ray photons. Most of this energy eventually radiates away from the Sun. Second, high-energy protons and electrons in the atmosphere of the Sun are ejected directly into outer space as the solar wind and coronal mass ejections.[ citation needed]
The original mass of the Sun at the time it reached the main sequence remains uncertain.  The early Sun had much higher mass-loss rates than at present, and it may have lost anywhere from 1–7% of its natal mass over the course of its main-sequence lifetime.  The Sun gains a very small amount of mass through the impact of asteroids and comets. However, as the Sun already contains 99.86% of the Solar System's total mass, these impacts cannot offset the mass lost by radiation and ejection.[ citation needed]
One solar mass, M☉, can be converted to related units: 
It is also frequently useful in general relativity to express mass in units of length or time.
The solar mass parameter (G·M☉), as listed by the IAU Division I Working Group, has the following estimates: