What is the tax treatment for profit/loss on the sale of a home that is not your primary residence? Does length of ownership matter? USA rules, please.
The length of ownership matters - it's capital gain.
Because it is not primary residence, you don't get the $250K capital gain exclusion (more for married).
By the way, for the matter of sale "primary residence" is a house you own and in which you lived 2 of the last 5 years prior to sale. So even if it is not your primary residence now, if it was recently - you can take the exclusion.