The Main-Sequence Lifetime of stars charts the approximate lifetime of stars. The chart is based on the mass and luminosity of the star. There is a correlation between mass and luminosity as well. The sun is given one solar mass and one solar luminosity. The expected lifetime for the sun is about 10 billion years. A star with twice the mass would be ten times as bright, but live only 2 billion years (or about 1/5 as long).
Stars with more mass do not last as long because they burn fuel at a faster rate. A star with twice the mass of the sun would burn its fuel about ten times faster. The timeframes are estimates and based largely on the luminosity, which is an indicator of fuel consumption. The lifetime could vary by a few billion years.