Wildfire victims have many worries, and taxes might seem far down on the list. But how fire victims are taxed can be pretty surprising. It depends on what they collect, what they claim on their taxes, if they are rebuilding their property, their insurance and more. Another big variable is whether they sue PG&E. It can build out a complex tax picture, especially now that there is a new tax on litigation settlements, as many legal fees can no longer be deducted.

The IRS (and California’s notoriously tough Franchise Tax Board) require annual tax filings, so several years may be peppered with fire items. Say you lose a $1 million home, but collect $1 million from your insurance company or PG&E.

There's no tax, right? Not so fast.

You need to know about the tax basis of the property, usually purchase price, plus improvements. Your property might be worth $1 million when it was destroyed, but if the original purchase price plus improvements was only $100,000, there is a $900,000gain.

Does that mean a fire victim must pay tax on $900,000? Not necessarily. If you qualify and replace your home, you can apply your old $100,000 tax basis to a replacement. That means you should not need to pay tax on that $900,000 gain until you eventually sell the replacement home. The replacement must generally be purchased within two years after the close of the first year in which any part of the casualty gain is realized. For Federal Declared Disasters, you get four years. However, if your insurance company has paid you enough to create even $1 of gain on your destroyed property, the clock for acquiring replacement property may already have started.

Another big issue is claiming a casualty loss. Up until 2018, many taxpayers could claim casualty losses on their tax returns. For 2018 through 2025, casualty losses are allowed only if your loss was the result of a Federal Declared Disaster. Most major California wildfires are a Federal Declared Disaster, but determining whether claiming a loss is a good move can be complex.

How to handle expenses for temporary housing and similar expenses can also be tricky. If your primary residence is damaged or destroyed, insurance proceeds intended to compensate you for living expenses like housing and food may be partially tax-free. However, if the insurance proceeds pay you for living expenses you would have normally incurred if your home had not been damaged, say your mortgage payment or your typical food expenses, that portion may be taxable income to you. If the insurance proceeds exceed the actual amount you spend on temporary housing, food, and other living expenses, that surplus can be taxable.

For victims who eventually get a legal settlement, how will it be taxed? Health problems from smoke inhalation or from the exacerbation of pre-existing medical problems can be enough for tax-free damages. Section 104 of the tax code excludes damages for personal physical injuries or physical sickness. But the damages must be physical, not merely emotional, and that can be a chicken or egg issue.

Most money in fire cases is fully taxable, and if you do not reinvest in time, you may have a big capital gain. However, up to $500,000 from a primary residence may be tax-free for a married couple filing jointly. It isn't only the IRS that collects tax. States do too, notably California, where all income is taxed at up to 13.3%, even capital gain.

Many fire victim plaintiffs use contingent fee lawyers. Up until 2018, it was clear that legal fees were virtually always tax-deductible. Now, however, many legal fees are no longer deductible. Thus, some plaintiffs may have to pay taxes on their gross recoveries, even though 40% or more is paid to their lawyer, who also must pay tax on the same fees. The tax treatment of the legal fees has become a major tax problem associated with many types of litigation. Fortunately, if the money can be treated as capital gain, the legal fees can often be treated as additional basis or as a selling expense. In effect, it can mean paying tax only on the net recovery.

Understandably, most fire victims hope not to face any tax hit at all. That is possible in some cases, but it can involve scrupulous attention to timing and details. When it comes to taxes or fire, be careful out there.

Robert W. Wood is a tax lawyer and managing partner at Wood LLP. He can be reached at Wood@WoodLLP.com