QIn June, I sold a house and made a profit of about $245,000. I had owned the house for about 17 years. However, I am a foreign service officer and have lived in the house only 14 months out of the past 15 years. I went on my first overseas assignment in August 1991 and have rented the house since.

Am I entitled to any tax benefits because of my status as a foreign service officer? Is there anything I can do at this stage to avoid paying any capital gains tax, such as buying another investment property?

AI think you will have to pay the capital gains tax, even though the law gives foreign service officers a break in some circumstances.

Current law allows all homeowners who owned and used their homes for two out of the five years before it is sold to exclude up to $250,000 of gain ($500,000 if you are married and file a joint tax return).

Since 2003, the Military Family Tax Relief Act has provided significant additional benefits for military and foreign service personnel.

According to the IRS: "You can choose to have the five-year test period for ownership and use suspended during any period you or your spouse serve on 'qualified official extended duty' as a member of the uniformed services or Foreign Service of the United States. This means that you may be able to meet the two-year use test even if, because of your service, you did not actually live in your home for at least the required two years during the five-year period ending on the date of sale.

"The period of suspension cannot last more than 10 years. Together, the 10-year suspension period and the five-year test period can be as long as, but no more than, 15 years. You cannot suspend the five-year period for more than one property at a time. You can revoke your choice to suspend the five-year period at any time."

The IRS provides a helpful example:

"Mary bought a home on April 1, 1989. She used it as her main home until September 1, 1992, when she went on qualified official extended duty with the Navy. She did not live in the house again before selling it on August 1, 2005. Mary elects to use the entire 10-year suspension period. Therefore, the suspension period would extend back from August 1, 2005, to August 1, 1995, and the 5-year test period would extend back to August 1, 1990. During that period, Mary owned the house all five years and lived in it as her main home from August 1, 1990, until September 1, 1992 -- a period of 25 months. She meets the ownership and use tests because she owned and lived in the home for two years during this test period." (From IRS Publication 523, "Selling Your Home.")

Now, let's look at your example. You sold your house in June 2005. Thus, according to the law, you can look back 15 years, to June 1990. To take advantage of the full $250,000 exclusion (or $500,000 if you are married), you had to have lived in the house for a full two years beginning June 1990.

However, you say you lived in the house for only 14 months -- 10 months short of the test period.

There is another provision in the tax law, called a reduced maximum exclusion, that allows a homeowner a partial exclusion of gain. You may be able to get a break on your capital gains tax payment if you are required to sell your home because of a change in employment, health reasons, or specified unforeseen circumstances such as death, unemployment (if the taxpayer is eligible for unemployment compensation), a change in employment status that results in your inability to pay reasonable living expenses, divorce or legal separation, or multiple births resulting from one pregnancy.

The reduced exclusion is determined by multiplying the maximum allowable exclusion ($250,000 or $500,000) by a fraction that represents the actual time owning or living in the house. The denominator of this fraction is either 730 days or 24 months (depending on the time of ownership), and the numerator is the shortest of the period of time that the taxpayer owned the property during the five-year period; the period of time that the homeowner used the property as the principal residence; or the period of time between the date of the prior sale of property for which the taxpayer excluded gain as a sale and the date of the current sale.

This is complicated and may require professional help to determine the amount of the partial exclusion. However, these factors are applicable only if they are the primary reason the homeowner has to sell before the two-year test period has run.

In your case, it does not appear from your letter that you were forced to sell. I suspect that the good market was one of the primary reasons you sold. Unfortunately, that is not going to fly with the IRS.

You also asked if there is any way to avoid paying the capital gains tax. The Federal tax is 15 percent of your profit; depending on where your property is located, you may also have to pay state tax.

It is too late to shelter that profit. If you had planned earlier, you could have entered into a 1031 exchange, called a Starker exchange, to acquire another investment property. However, that would have had to occur when you sold your house.

Accordingly, you will have to pay the tax. You should review all your records since you bought the house. Any improvements that you made to the property will increase your tax basis, and thus lower the amount of tax you will have to pay.

I suggest that you discuss this with your tax accountant, with a view toward taking every legal step available so that your capital gains tax can be reduced.

Benny L. Kass is a Washington lawyer. For a free copy of the booklet "A Guide to Settlement on Your New Home," send a self-addressed stamped envelope to Benny L. Kass, Suite 1100, 1050 17th St. NW, Washington, D.C. 20036. Readers may also send questions to him at that address.