My wife and I are considering splitting off a portion of the land attached to our main residence. Will this be taxed as a capital gain? Can the money be put towards the mortgage and not be taxed? Can the profit from the sale be excluded from capital gains?
I'm going to answer this question for US taxpayers.
It depends whether you sell your primary residence within 2 years of selling the vacant land next to your home. If you do not, then this is just a sale of land at the capital gains rate. If you do sell your residence, then you may be able to exclude the land sale as part of the same sale (even if it was to multiple buyers).
Vacant land. The sale of vacant land is not a sale of your main home unless:
The vacant land is adjacent to land containing your home,
You owned and used the vacant land as part of your main home,
The separate sale of your home satisfies the requirements for exclusion and occurs within 2 years before or 2 years after the date of the sale of the vacant land, and
The other requirements for excluding gain from the sale of a main home have been satisfied with respect to the vacant land.
If these requirements are met, the sale of the home and the sale of the vacant land are treated as one sale and only one maximum exclusion can be applied to any gain. See Excluding the Gain , later.
Without the primary residence exclusion, the sale of real property will generally be capital gain.
There are ways to avoid capital gain, such as swapping it for another piece of land (a §1031 like-kind exchange or a Starker exchange) - though the cash "boot" that changes hands will generally be taxable to recipient and go into the basis of the payor. I'm not familiar with a way to shield sale proceeds from tax by paying your mortgage (except to the extent that mortgage interest is already deductible).
Don't forget to reduce your gains by your cost basis. You only pay tax on the gain, not the whole sale price. And as you allocate your basis between the land the home, remember that allocations to basis of one come at the expense of basis for the other (if you spent $500 buying two items, then allocating $50 to one means you've allocated no more than $450 to the other).
Speaking purely hypothetically, a person who purchased land and a home together with a single price could decide an allocation of basis that nearly eliminated gain on the sale of a parcel. Then whenever the home finally sold, the primary residence gain exclusion would wipe out $250k ($500k married) of the gain, so the basis is less valuable when allocated to the home. Of course, the IRS is fully aware of this issue and there would have to be some reasonable basis for allocating the basis in such a way (and no clear documentation showing a different allocation).