From IRS Publication 521 (2014), Moving Expenses
When To Deduct Expenses
You may have a choice of when to deduct your moving expenses.
Expenses
not reimbursed: If you were not reimbursed, deduct your moving
expenses in the year you paid or incurred the expenses.
Example.
In December 2013, your employer transferred you to another city in the
United States, where you still work. You are single and were not
reimbursed for your moving expenses. In 2013, you paid for moving your
furniture and deducted these expenses on your 2013 tax return. In
January 2014, you paid for travel to the new city. You can deduct
these additional expenses on your 2014 tax return.
Of course if you don't end up working the required 39 weeks you will have to reverse this the following year.
Time Test Not Yet Met
You can deduct your moving expenses on your 2014 tax return even
though you have not met the time test by the date your 2014 return is
due. You can do this if you expect to meet the 39-week test in 2015 or
the 78-week test in 2015 or 2016.
If you do not deduct your moving expenses on your 2014 return, and you
later meet the time test, you can file an amended return for 2014 to
take the deduction. See When To Deduct Expenses later, for more
details. Failure to meet the time test. If you deduct moving
expenses but do not meet the time test in 2015 or 2016, you must
either:
Report your moving expense deduction as other income on your Form 1040 for the year you cannot meet the test, or
Use Form 1040X to amend your 2014 return, figuring your tax without the moving expense deduction.
Example.
You arrive in the general area of your new job location, as an
employee, on September 15, 2014. You deduct your moving expenses on
your 2014 return, the year of the move, even though you have not yet
met the time test by the date your return is due. If you do not meet
the 39-week test during the 12-month period following your arrival in
the general area of your new job location, you must either:
Report your moving expense deduction as other income on your Form 1040 for 2015, or
Use Form 1040X to amend your 2014 return, figuring your tax without the moving expense deduction.
The distance test only cares about the distance from the old job to old home compared to new job to new home.
The distance test:
The distance between a job location and your home is the shortest of
the more commonly traveled routes between them. The distance test
considers only the location of your former home. It does not take into
account the location of your new home. See Figure A, earlier.
Example.
You moved to a new home less than 50 miles from your former home
because you changed main job locations. Your old main job location was
3 miles from your former home. Your new main job location is 60 miles
from that home. Because your new main job location is 57 miles farther
from your former home than the distance from your former home to your
old main job location, you meet the distance test.