In the right water a molly will live 3 years or more and a guppy may live 18 months. That is a big if though. Mollies are more demanding in their needs than guppies so it can easily come out the other way around. For a nice long life on a molly, it needs hard water with a high pH, over 7.5 minimum. I believe that you said in another thread that all of your tanks are small ones of 7 gallons or less. That will also be a big factor in keeping these fish. A single molly can live well in a 7 gallon tank but not much less and would be crowded if there were much more than 2 fish in the tank. A 7 gallon tank is big enough to hold several guppies in good health.
All of these factors should be taken into consideration when deciding how you want to stock your tank.