It depends on when the sale takes place. If you sell so that you will have used the home for at least two years within the five years before the sale, you will be able to take the exclusion. If it takes a long time to sell and you are no longer using the New York home as your residence, you may be out of luck.
Gross income less allowable adjustments, such as IRA, alimony, and Keogh deductions. AGI determines whether various tax benefits are phased out, such as personal exemptions, itemized deductions, and the rental loss allowance and modified adjusted gross income (MAGI).