The Tax Court, over the past few years, has done the taxpayers several handsome favors.

The judges have, among other things, made it easier to put an insurance policy beyond the reach of estate taxes, held that punitive damages won in court are not subject to income tax and made it easier to deduct costs associated with a home office.

The problem, however, is that what the Tax Court giveth, a higher court or Congress can taketh away, and the Internal Revenue Service has been busy trying to win back legislatively or by appeal what it lost in the tax tribunal.

The results have been mixed, but becausethe issues affect so many people, it is worth reviewing their status.

The best news for taxpayers concerns insurance policies owned by trusts. Not only was the Tax Court upheld by the 6th U.S. Circuit Court of Appeals last year over this, it recently faced a similar case and again ruled in the taxpayer's favor.

The issue is whether, when a life insurance policy is owned by a trust and when the policy was purchased within three years of the insured person's death, the proceeds are included in the insured person's taxable estate.

In general, life insurance proceeds are not subject to federal income tax.

But if the policy is owned by the dead person, or if the beneficiary is his or her estate, the proceeds are included in the person's estate and subject to estate taxes.

Thus, it is common practice for people with relatively large estates to place ownership of their life insurance elsewhere. Sometimes beneficiaries can own the policy, but many people prefer trusts because they offer more flexibility.

The problem arises when the insured person dies within three years of setting up the arrangement.

If the dead person owned the policy and transferred it to the trust within three years of his or her death, the transfer is deemed to have been "in contemplation of death" and the payoff included in the taxable estate.

The idea is that it otherwise would be too easy to give a policy away at the last minute and escape tax.

Likewise, if the dead person had any "incidents of ownership" -- such as the right to change the beneficiary, the right to cancel the policy or the right to any other "beneficial interest" -- during the three years before death, then the policy is included in his or her taxable estate.

But if the taxpayer sets up an irrevocable trust, and the trust buys the policy, and the insured has none of the rights that would be an incident of ownership, then the policy is not included in the taxable estate, the Tax Court and the 6th U.S. Circuit Court of Appeals have ruled.

This is true even if the insured person gives the money to the trust so that the trust can pay the premiums.

The Tax Court, in a 1989 case called Estate of Headrick vs. Commissioner, abandoned a previously held doctrine that payment of the premiums was a key test of ownership.

That view was sustained by the 6th Circuit last year.

But the IRS has continued to try. Arguing that "these courts' analyses are faulty," it tried to include insurance proceeds in the estate of a California woman who died in 1985.

Last month, the Tax Court took only five pages to dispose of the agency's claim.

So for the moment, the taxpayers remain solidly ahead on this issue. An IRS spokesman cautioned that there may be other cases, appealable to other circuits, and the agency has not yet given up on the issue.

Similarly, the IRS is fighting to win back ground it lost last year on the issue of home-office deductions.

A McLean doctor named Nader E. Soliman, who practiced at several hospitals and managed the business end of his practice at home, won the right to deduct his home office expenses.

In that case, the Tax Court abandoned its "focal point" test -- that a home office had to be the focal point of the business to be deductible -- substituting instead a requirement that the home office be essential to his business, that he spend considerable time there and that there be no other place available for performing the office functions.

The IRS asked the Tax Court for a rehearing, was denied and appealed to the 4th U.S. Circuit Court of Appeals. The case is pending there.

Meanwhile, the IRS has said that it won't follow the Tax Court's decision in the Soliman case, so taxpayers whose circumstances resemble Soliman's must be prepared to take the service to court to defend their deductions.

But while taxpayers appear to have one solid win and one issue that remains in question, they clearly have been dealt a blow on another front.

In a dispute that involves the taxation of punitive damages won in a lawsuit, both the appellate court and Congress have jumped in to roll back a victory won by a Maryland woman in 1989.

Bonnie A. Miller of Westminster, Md., had sued her former employers, charging them with defaming her. The employers had accused her of embezzlement in an effort to cover up a bribery scheme they themselves were engaged in, she said.

She won an initial judgment and then agreed to settle her case for $900,000, of which she got $525,000 after court costs and attorneys' fees. She didn't report the money as income and the IRS assessed her a $525,000 deficiency.

Since the law in effect at the time excluded from income any amounts received "on account of personal injuries," and defamation is a personal injury, the Tax Court concluded that the settlement was not taxable.

The IRS appealed and won in the 4th Circuit. The court decided that the punitive damages flowed not from Miller's injury but from her employer's conduct. Thus, the punitive damages did not qualify for exclusion from tax.

While the Miller case was still in the courts, Congress also amended the law, distinguishing between physical and nonphysical injuries and specifying that punitive damages resulting from nonphysical injuries are taxable.

The result is that Miller and plaintiffs like her clearly have to pay taxes on the punitive portion of any judgments or settlements they win for nonphysical injuries.

But while the law is clearer, administering it may be harder. For one thing, distinguishing between compensatory damages -- those that make up for the wrong done the plaintiff -- from punitive ones is quite difficult in certain situations, especially defamation cases.

In addition, in out-of-court settlements it will be in the interest of both parties to call the damages compensatory. So it seems likely that where large awards or settlements are made, the damage litigation will be followed by tax litigation.

Thus, the taxpayers lose, the IRS sort of wins and the lawyers definitely win.