when do I need life insurance and how much

Life insurance is an important safety net, but when do you need to buy life insurance and how much should you get?