A taxpayer who takes on the IRS may feel a bit like David going against Goliath. But don’t ­forget—David won, as taxpayers end up doing in almost 20% of legal challenges, according to the latest analysis by the National Taxpayer Advocate’s office. Once a court case is decided in favor of a taxpayer, it becomes easier for other taxpayers to claim and get the same tax breaks.

Here are some notable recent cases where taxpayers fought the IRS and won—and how you can benefit from the precedents those cases set…

Alternative medical treatments can be deductible. Victoria Malev’s painful spinal disease wasn’t helped enough by a chiropractor, and she feared that conventional treatments were too risky. Instead, she began alternative treatments, unreimbursed by insurance, from four individuals who were not recognized as conventional medical caregivers. She took tax deductions for the cost of these treatments as unreimbursed medical expenses.

The IRS disallowed those deductions and said she owed back taxes and a penalty for underpayment of taxes.

IRS Reasoning: Malev’s treatments were not provided by individuals ­licensed to practice medicine.

Tax Court Ruling: Malev could deduct the expenses for her alternative treatments largely because the language of the tax regulations surrounding medical deductions makes the patient’s state of mind regarding her condition relevant. Malev’s testimony that the treatments had greatly improved her medical condition demonstrated her sincere belief that she incurred those expenses to cure or mitigate her symptoms. What’s more, those expenses were something that an individual would not routinely incur for nonmedical reasons. Finally, the court determined that the law does not require those services to be provided by a licensed medical practitioner.

Note: After receiving notice from the IRS of her tax deficiency, Malev had obtained a new diagnosis from a medical professional and a recommendation that she pursue “integrated medical treatment.” Had Malev received that recommendation before seeking alternative treatments, the case would have been even easier to resolve in her favor, since the alternative treatments would have clearly fallen under the recommendation of a medical professional.

Lesson: You can deduct expenses for unreimbursed alternative treatments provided that they are clearly directed to address a specific medical condition. But it’s helpful to first receive a diagnosis from a licensed medical professional who recommends a course of integrative medicine.

Malev v. Commissioner, No. 1282-16S

Qualify as a real estate pro and reap more deductions. Mohammad M. ­Zarrinnegar and his dentist wife owned a dental practice in California. They worked their joint dental practice in shifts. Mohammad worked at the dental practice 14 hours a week, but he spent the rest of his time managing the couple’s real estate business, which included four rental properties and a brokerage. For three years, the couple claimed tax deductions for real estate–related losses ranging from $221,000 to $242,000 against income from their dental practice.

The IRS denied these deductions.

IRS Reasoning: Zarrinnegar was employed in a non–real estate field and could not claim to be a real estate professional who was entitled to deduct real estate losses from total income. Instead, the losses from his investment properties should be considered “passive” and could be used to offset only passive income.

Tax Court Ruling: The court applied the two tests that may qualify a taxpayer as a real estate professional—whether the person spent more than 750 hours during the year actively participating in real estate work…and whether the time spent amounted to more than half of total working hours for the year. ­Zarrinnegar offered detailed logs showing that he spent more than 1,000 hours per year on real estate activities and fewer than 1,000 hours per year at the dental practice. Several witnesses testified, corroborating his logs.

As a result, the court found that he satisfied both elements of the real estate professional test and could deduct the full real estate losses during the years in question against his dental practice income.

Lesson: Taxpayers who hold full- or part-time jobs in a non–real estate industry still can deduct all losses from a real estate business as long as they document that they have met the two tests that qualify them as real estate ­professionals.

Zarrinnegar, T.C. Memo. 2017-34

You can receive a waiver on taxes and penalties even if you miss the deadline for an IRA rollover “hardship exemption.” John C. Trimmer retired from the New York City Police Department at age 47. Several weeks after retiring, Trimmer began suffering from a major depressive episode and became withdrawn and unable to perform his normal daily tasks.

During this time, he received two retirement account distributions totaling about $100,000. The checks lay on his dresser for more than a month until he deposited them in a bank. Approximately nine months later, on the advice of Trimmer’s tax preparer, he rolled the money into an individual retirement account (IRA) and reported the distributions as nontaxable on his tax return.

The IRS told Trimmer that the $100,000 was indeed taxable because he had missed a 60-day rollover deadline…and that he also owed a 10% penalty for early withdrawal from a retirement plan (before age 59½). In total, he owed about $40,000. Trimmer then wrote to the IRS, explaining that his health condition had prevented him from completing the rollover sooner.

IRS Reasoning: The law allows relief from the rollover deadline in cases of “hardship,” but Trimmer had not formally applied for this relief on an official IRS form…and he hadn’t established that he was unable to complete a rollover before the deadline.

Tax Court Ruling: Because Trimmer had written to the IRS describing his medical disability, the court faulted the agency for failing to explain to Trimmer the requirement to file a formal application for a hardship waiver. Moreover, it found that Trimmer’s letter in response to the IRS’s initial contact constituted a waiver request.

Finally, the court held that Trimmer’s depression was a disability that had impaired his ability to meet the rollover deadline. As a result, all taxes and penalties were waived.

Lesson: If you have a medical condition or other difficulty that has prevented you from meeting a rollover requirement—and that prevented you from applying for a hardship waiver following IRS procedures—you aren’t out of luck. Provided that you eventually complete the rollover and can explain to the IRS the reasons why you had failed to meet the deadline, you might still receive relief from taxes and penalties.

Trimmer v. Commissioner, 148 T.C. No. 14 (2017)

An owner’s estimate of a property’s value may be acceptable to determine a casualty loss. Howard Bruce Coates and his wife owned two properties in Oklahoma, one that included the couple’s home and two barns and another that was undeveloped woodland. A tornado damaged their home and barns and flattened their woodland.

Coates estimated that the first property lost $210,000 in value and that the undeveloped land lost $88,000 in value. Insurance covered part of the loss on the first property, but his second property was uninsured. After subtracting their insurance payout, the couple reported a deductible “casualty loss” of about $128,000 for both properties.

The IRS disallowed the casualty loss and assessed a penalty of more than $6,000 for inaccuracy in reporting the loss.

IRS Reasoning: Coates wasn’t a certified appraiser and had not explained his method of determining his properties’ values.

Tax Court Ruling: Although the law requires that before-and-after fair market value for a casualty loss be determined by a competent appraisal, the appraisal does not have to be done by a professional. Coates had bought and sold many properties in the area over many years, so his assessment of the value of the property that included his house and barns was credible. The court did, however, reject a casualty loss for the woodland property, saying that Coates had not proved its value…but siding again with Coates, the accuracy-related penalty was rescinded because the tax return had been prepared in good faith.

Lesson: If there’s no recent appraisal of your property before a disaster strikes, your own informed opinion of the value of your home and land might suffice, particularly if you have had experience buying and selling property in your area. Without extensive experience, you should obtain a credible outside appraisal for losses.

Coates v. Commissioner, T.C. Memo. 2016-197