Investors & landlords

See IRS publication 523.  The sale of the vacant land is eligible to be treated as part of the home, and eligible for the exclusion, if you have used it as part of the home, and if you sell the land and the house within 2 years of each other, even if the sales are to different people.

https://www.irs.gov/uac/about-publication-523

However, the publication also says "If your sale of vacant land meets all these require- ments, you must treat that sale and the sale of your home as a single transaction for tax purposes."  I don't know how to do that if the sale happens in two different tax years, so you may need to see a tax professional.  (If the total gain is less than your exclusion, and if there is no 1099-S issued, then the sale is not reported and it doesn't matter if the two sales occur in different years. However, if the total combined gain is more than the exclusion so that some tax is owed, or if a 1099-S is issued, and if the two sales are completed in different tax years, you will probably need a see a tax professional for help.)

If you end up owning the land more than two years after selling the house, it will be treated as a sale of land and subject to gains.  You will allocate the cost basis based on the value of the house and land when you originally purchased the property.  You can allocate your legal fees and expenses incurred in splitting the parcels based on acreage, which will help raise the cost basis of the land and reduce your gain.  You also have the option of adding your property taxes to the cost basis rather than deducting them ("capitalize" your costs), which will lower your eventual gain (but you miss the immediate deduction.)   The election to capitalize expenses must be made in writing each year with a written statement attached to your tax return.