Q: My great-grandfather was a farmer and had about 23 acres when he died. My grandfather passed away before my great-grandfather. The land was put in a trust for my mother and uncles. My mother passed away two years ago.

The land has now been sold, and I’m supposed to get a third of the share of the proceeds per her will. What do I have to pay in taxes on the money? I know there are capital gains on the property, but how does that work? Do we use the value from when my great-grandfather passed as a base?

A: Thanks for your question. We have good news for you. When your great-grandfather died, his land passed down to your mother and your uncles. For simplicity’s sake, we’ll assume that your great-grandfather’s estate was under the federal estate tax limits when he died, and his estate did not have to pay any federal estate taxes at that time.

Then your mother and uncles became owners of the land. Here’s where it gets interesting. Usually, when a person inherits an asset, they inherit the asset and step up the value of the asset at the time of the person’s death. Let’s say your great-grandfather purchased the land for $10,000 and at the time of his death the land was worth $100,000. Your mom and your uncles inherited it at that value.

You say that your uncles (we’re going to assume there are two uncles) then sold the land after your mom died. When your mom died, you inherited her interest in the land. If you are an only child and the only beneficiary, you would get her one-third share of the land or one-third share in the proceeds. And given the stepped-up basis rules, you inherited the land at its value at around the time she died.

Let’s assume that when she died the land was worth $300,000. Your share of the land would have been worth $100,000. That’s your cost or basis in the land. If you sold the land around the time she died or up to a year after her death and received $100,000, you should have no federal income or capital gains taxes to pay. (You’ll have to check how your state would treat your tax situation.)

Now, if your family ended up selling the land for $390,000 recently, in our example, the basis in your share of the land was $100,000 and your sales proceeds would have been $130,000 or a $30,000 profit. So, having said all that, you’d only have to pay tax on the $30,000.

We’re not going to say whether you’ll pay capital gains taxes or ordinary income on the profit, as we don’t have sufficient information from your email. Barring extraordinary circumstances, if your family sold the land within one year of your mom’s death, you’d have no tax to pay. If it was after one year, your profit should be taxed at the capital gains rate. And don’t forget that you’ll have to pay state taxes on that profit and the additional 3.8 percent tax on the sale of investment property. (If you lived in the home as your primary residence when it was sold, you may not have to pay anything.)

We hope this example and information helps you figure out where you stand with the IRS.

Ilyce Glink is the author of “100 Questions Every First-Time Home Buyer Should Ask” (Fourth Edition). She is also the chief executive of Best Money Moves, an app that employers provide to employees to measure and dial down financial stress. Samuel J. Tamkin is a Chicago-based real estate attorney. Contact them through the website ThinkGlink.com.

Read more in Real Estate: