A star's lifespan is primarily determined by its mass and luminosity (rate of energy output, which is proportional to the rate of nuclear reactions). More massive stars have more fuel but burn it much faster due to higher core temperatures and pressures, resulting in shorter lives. Less massive stars burn their fuel slowly and live much longer. Giant stars are typically more massive and much more luminous than dwarf stars.