The final calculations are done on a per packet basis for the simple fact that you can't purchase part of a packet of smokes or tobacco.
If:
- a = Grams not smoked per day
- b = Grams per packet
- c = Days smokefree
- d = Cost per packet
then:
Total money saved =
RoundUp((a / b) x c) x d
RoundUp rounds the number its given to the nearest whole number.