Investors & landlords

assuming the move was more than 50 miles (and understand your COMMUTE has to be an additional 50 miles... a) distance from new job to your old home has to exceed b) the distance from your old job to your old home) by 50 miles), then you could be eligible for a PARTIAL exclusion

 

see worksheet #1 at the attached link

 

https://www.irs.gov/publications/p523#en_US_2018_publink100073096

 

that is the same link @Carl  suggested, but I am pointing you to the worksheet #1