The basic rule for home sales is that if a person both owns a home and uses it as a main residence for two of the five years before selling it, up to $500,000 of gain on the sale can be taken tax free on a joint return, or $250,000 on a single return. This is called the home sale exclusion.