The biggest hurdle that investors face is paying tax on the gains on their long-term investments. Yet the tax laws actually give heirs a huge tax break when they inherit shares of stock or other investments that have gone up in value. By allowing you to reset your cost basis, the tax laws let you wipe out potential capital gains tax liability entirely, which can cut thousands of dollars off your tax bill. Below, we'll go through how to figure out what your tax basis is on inherited stock.

The basis step-up

The rules behind inherited stock and tax basis are relatively simple. When you inherit stock from someone, your tax basis becomes the value of that stock on the date that person died, unless the person's estate tax return chose what's known as the alternate valuation date that's six months after the date of death. In many cases, that can be much different from the deceased person's tax basis before death.

There are a couple of reasons why lawmakers created the basis step-up rules. As anyone who has invested long-term can attest, keeping track of the tax basis for your stocks can be an ongoing nightmare. Keeping records of every purchase and reinvestment over time is a monumental task. When you have to rely on someone else's records dating back to before you even took ownership of the inherited stock, that task can become nearly impossible. In addition, because assets in a person's estate are potentially subject to estate taxes, the basis step-up eliminates the possibility of double taxation.

Figuring out the basis

If a substantial amount of time has passed since you inherited the stock, you'll need to find historical prices for the shares as of the date of death. Fortunately, those prices are readily available from financial news sources and from company investor relations departments.

In addition, if you enrolled in an automatic dividend reinvestment plan (available via most major brokerages) that resulted in your purchasing additional shares after you inherited them, it's important to understand that the cost basis of the inherited shares is separate from the cost basis of the newer shares. If you fail to account properly for both sets of shares, then you can end up paying more in capital gains taxes than you should.

Finally, keep in mind that the step-up rules only apply to property that was legally included in the deceased person's estate at death. Gifts of stock that someone gave you while they were still living don't get a step-up, and trusts on your behalf that became irrevocable prior to the death of whoever created the trust often won't get favorable treatment either.

Nevertheless, for most situations involving inherited stock, the basis step-up rules make things a lot simpler and less costly for heirs. Just knowing the rule and using it correctly can save you thousands in unnecessary taxes.

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center in general or this page in particular. Your input will help us help the world invest, better! Email us at knowledgecenter@fool.com. Thanks -- and Fool on!

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.