Nothing in the tax code is straightforward or easy to understand, and that’s especially true when it comes to life insurance with all the caveats, exceptions and treatments.

To begin with, at death, proceeds from a life insurance policy are not taxable income, unless of course, the policy was turned over to the taxpayer for a price – then you may encounter some issues. It’s a good idea to check with a tax professional to ensure that the transaction is being handled properly for tax purposes, otherwise, the beneficiary does not have to worry about declaring the proceeds as taxable income.

Oftentimes the proceeds from the insurance policy may accrue interest between the date of death and the actual date of remittance—and that is taxable income. You will likely receive a Form 1099-INT from the insurance company at year end, make sure you include this amount on your income tax return. The benefit check may also include a return of premium, but this is normally not taxable income.

If you have a cash value life insurance policy that pays dividends, you may be liable to pay taxes on the amount of dividends that exceed the amount of the premiums paid for the policy.  Otherwise, policy dividends are generally not taxable. Again, you will receive a Form 1099-DIV by Jan. 31 citing the amount of dividends paid that must be included in your taxable income.

Let’s say you decide to cash in a whole life policy, this tends to result in a taxable transaction, but usually not on the entire sum. However, what you receive in excess of what you paid in to the policy over the years will be considered taxable income and subject to income tax. Add all the premiums paid over the years then subtract any rebates, premium credits, dividends or un-repaid loans. Subtract this amount from the proceeds to determine your taxable portion.

For example, you have paid in premiums totaling $10,000 and received dividends and rebates totaling $1,000. Your net investment is $9,000. Let’s say the proceeds are $20,000. After subtracting your $9,000 investment the difference of $11,000 will be taxable to you.

Some policies include accelerated death benefits or viatical settlements. If you become terminally ill with a life expectancy of 24 or fewer months, you or your assignee will be allowed to cash in the policy to help cover costs of long-term care services and other medical or personal expenses. The proceeds from the policy are not taxable. Amounts paid on a per diem or other periodic basis may be excludable as well under the terms for long-term care contracts. You should obtain a letter from your physician stating that your condition is terminal within the 24 month window.

A viatical settlement provider is someone who is in the business of buying life insurance contracts on the lives of terminally ill individuals. For more information on this topic refer to IRS Code Section 101(g)(2)(B) or consult your tax professional.

An endowment contract is a form of life insurance that will pay a specific amount on a certain date or, if the insured dies before that date, to a beneficiary. If the payments occur due to death and go to the beneficiary they are not included as taxable income.  Lump sum payments made to the insured at maturity are taxable if they exceed the cost of the policy. If the taxpayer elects to receive installments then it’s pretty much treated as an annuity.

Bonnie Lee is an enrolled agent admitted to practice and representing taxpayers in all 50 states at all levels within the Internal Revenue Service. She is the owner of Taxpertise in Sonoma, Calif., and the author of Entrepreneur Press book, “Taxpertise, The Complete Book of Dirty Little Secrets and Hidden Deductions for Small Business that the IRS Doesn't Want You to Know.” Her new e-book Taxpertise for the Creative Mind Murder, Mayem, Romance, Comedy and Tax Tips for Artists of all Kinds is available at all major booksellers. Follow Bonnie Lee on Twitter and on Facebook.