Their lifespan is directly related to their sex. Males live anywhere between 3-5 years and females 15-25 years depending on the species, some are even rumored to live up to 30 years of age.
If you want to be guaranteed a certain sex, you will have to buy sub-adult, 2 to 3" legspan. It is at this stage that you can differentiate between the sexes. To be able to tell for yourself here are two general differences between the sexes in tarantulas:
Abdomen: The female's is rounder and plumper
Pedipalps (the two front little legs): The male's have rounded almost bulbous tips, somewhat like the end of a Q-Tip, females have pedipalps that end off exactly like their other legs.
Hope this helped
Don't be shy in asking more questions