<prompt> Human: Purchased a home using a USDA loan 5 years ago. after less than 2 years in the home, my husband got a new job and we moved. We have been renting it out now for just over the mortgage. The market has improved substantially and we stand to make about 40k or more if we sell. How do i know if i will have to pay capital gains? How much is the tax, is it on the profit or the sale?  <response>: You of course know that you dont meet the use test since you lived in your home for under two years. But you can still get a reduced of the 250K exclusion based on how long you lived in the home, since the sale of your home was due to a change in employment. So you will be eligible for a portion of the exclusion. Theres a formula for calculating this, based on the amount of time you actually lived there, and the amount of time you owned the house.You will want to talk to an accountant about this for certain given the money involved. I dont know enough on the topic to actually try to do the calculation here. 