Deductions & credits

getting an education is not a job. so if you don't have a job in the new location that meets the job relocation criteria, you would not qualify for the job move exclusion.

the unforeseen circumstance exception would have to be due to an event the IRS determines to be an unforeseen circumstance.  there is no way for us to know how the IRS would look at this.

there is also another possibility facts and circumstances - If you don't meet the safe harbor tests then under REG 1.121-3(b) you may still qualify

Whether the requirements of this section are satisfied depends upon all the facts and circumstances. Factors that may be relevant in determining the taxpayer's primary reason for the sale or exchange include (but are not limited to) the extent to which -

(1) The sale or exchange and the circumstances giving rise to the sale or exchange are proximate in time;

(2) The suitability of the property as the taxpayer's principal residence materially changes;

(3) The taxpayer's financial ability to maintain the property is materially impaired;

(4) The taxpayer uses the property as the taxpayer's residence during the period of the taxpayer's ownership of the property;

(5) The circumstances giving rise to the sale or exchange are not reasonably foreseeable when the taxpayer begins using the property as the taxpayer's principal residence; and

(6) The circumstances giving rise to the sale or exchange occur during the period of the taxpayer's ownership and use of the property as the taxpayer's principal residence.

 

I should have added that the job change exclusion depends on the fact that the principal reason for the move is a change in job locations.  I really don't think that moving to get additional education would meet this criterion 

 

 

unless someone posts that moving to get an education qualifies under either the safe harbor job location change or unforeseen circumstances, I suggest you consult with a tax pro.  they can look at your situation and do further research.  in the end, they may be unsure and suggest that you get a private letter ruling.