At the presidential debate last week, Donald Trump hinted that he might not have paid federal taxes. And now, newly leaked tax documents from 1995 may tell us why he might have been able to do this.

The information in Trump’s 1995 tax returns shows that he could have taken advantage of a tax provision called the “net operating loss carryback and carryforward” to avoid paying taxes for as much as 18 years.

We don’t hear about this part of the tax code often. It’s a rule that most of us will never interact with. So I created a quick and simple cartoon that explains the situation.

Trump lost $916 million from bad business investments in 1995, according to leaked tax forms obtained by the New York Times.

But the US tax code says people can deduct their businesses losses from their personal taxes in following years. And this isn’t just a one-year privilege — it can stretch on for more than a decade. So let’s run through how that would work.

Let's say the next year, in 1996, Trump earned $50 million. (This is a hypothetical number because Trump has not released his tax returns, so we don’t know how much he actually earned.) Normally, he would've had to pay federal taxes on all of that.

But because he lost so much money the previous year in business dealings, the tax code lets him deduct all of that $50 million — so he has no taxable income.

And because he lost so much money, he could've earned $50 million for the next 18 years and still used this deduction to pay no federal taxes. Each year, another $50 million of his losses could offset $50 million in new income, until he reaches the $918 million he lost in 1995.

This is all legal — and since this is part of the tax code, it would’ve made perfect sense for Trump to take advantage.

But the tension is that Trump is running for president, and it's not a good look to be living a lavish multimillion-dollar lifestyle while not paying federal taxes. Trump himself has been critical of those who don’t pay taxes.

HALF of Americans don't pay income tax despite crippling govt debt...http://t.co/gDAUj0Kt — Donald J. Trump (@realDonaldTrump) February 23, 2012

The newly revealed tax documents show it’s possible Trump could’ve been one of these people for many years.

If you want to read more about the Trump tax documents, I’d recommend this story from Matt Yglesias at Vox — and the original piece in the New York Times.