Beginning in 2018, the moving expense deduction is temporarily suspended, except if you are a member of the Armed Forces on active duty and, due to a military order, you move because of a permanent change of station.
An amount with code P will transfer to Line 4 of Form 3903 for moving expenses. Form 3903 can be completed for the amount of moving expenses paid by the taxpayer. If a moving expense deduction is computed, it will be reported on IRS Schedule 1 (Form 1040) Line 26.
To enter the W-2 box 12 amount:
To enter moving expenses for Form 3903: