Deductions & credits

because the home you owned was really a vacation home before it will become your principal residence the exclusion is figured as follows:

1) period not a principal residence during term of ownership

2) total ownership period 

3) gain

4) non-excludable gain  3) times 1)  divided by 2)

5) excludable gain 3) minus 4)

example 

1) 13 years

2) 15 years

3) $750,000

4) $650,000

5) excludable gain only $100,000 

now if it was your principal residence for 25 years

the non-excludable gain would be $750000 times 13 divided by 25 0r $390,000

leaving an excludable gain of $360,000

 

 

what this shows is the longer you live in it as your principal residence the larger the excludable portion up to a current maximum of $500,000