Tax records showing that Donald Trump told the IRS that he lost nearly $1 billion over the course of a decade starting in the mid-1980s highlight the complexity of how the tax code treats real estate investments, but they do not tell us much about the president’s business prowess.

The New York Times reported Tuesday that tax transcripts revealing Trump’s tax filings in the years 1985 through 1994 show the president lost nearly $1 billion, with big losses concentrated in the years 1990 and 1991.

“Mr. Trump lost so much money that he was able to avoid paying income taxes for eight of the 10 years,” the Times reported.

That may be true, although White House spokespeople have said the report is not accurate, and the Times has not released the underlying documents or explained the sources of its information. But the bigger contention of the article–that the tax records show Trump is not the artful dealmaker he purports to be–is not supported by the evidence presented.

The article’s most basic problem is that it assumes that the losses Trump reported on his taxes are actual economic losses. But that’s highly unlikely due to the nature of his business. As a real estate investor, Trump was not in a position of a store owner selling inventory below cost and incurring operating losses. Instead, he would have been reducing his reported income by the amount of his interest payments on loans and the depreciation of the property he owned.

This can be a powerful combination that can create what are, essentially, illusionary losses that reduce taxes but inflate an owner’s bank account. What’s more, the bigger the portfolio is of assets owned, the larger the write-offs will be for interest and depreciation.

Take the simplest example. A guy buys an apartment building worth $10 million. For simplicity’s sake, let’s say he bought it with cash. Each and every year for the next 27.5 years he will get to write-down his income by around $370,000. If his tenants pay him $300,000 in rent after basic expenses, he’ll declare a loss of $70,000 on his taxes. His net worth has declined on paper, but he has $300,000 more in cash every year. And if the rent payments ever exceed the depreciation amount, he’ll get to use those old accumulated losses to offset the new income.

In the real world, of course, things are more complicated than our simple example. Buildings are bought with loans, which require interest payments that count as business expenses and reduce both actual income and taxable income. And there are other operating expenses associated with upkeep and maintenance.

So imagine our guy took out an $8 million mortgage at five percent, paying $2 million cash. Now he’s got to pay $400,000 in mortgage payments. He wants to make at least that much so he charges tenants an aggregate of $425,000, which after upkeep comes out to $410,000 of net income. (Remember, if the bank didn’t think he could make more in rent than the mortgage payment, it probably wouldn’t have lent him the money.) The interest payment on the loan–let’s call it $390,000–is deductible from his income, leaving him with $20,000 in net income. He gets to keep that and pay no taxes on it, however, because he still gets to apply the $370,000 depreciation charge. He tells the IRS he lost $350,000.

Under our tax code, ordinary business expenses can be deducted in the year they are incurred. But when a business pays for a long-lasting item expected to produce income–like machinery, vehicles, or an apartment building–it is considered a capital investment. Instead of getting to write-off the cost all at once, the business is required to write it off over the course of decades. After the 1986 tax code, this was set at 27.5 years for residential real estate.

The combination of depreciation and interest deduction was so powerful an engine for creating paper losses that this became one of the most popular tax shelters in the 1980s, in part because the early Reagan tax cuts dramatically slashed the depreciation timeline, which allowed for bigger deductions. It was so popular and drove so much money into U.S. real estate that prices exploded higher–with dire results when the bubble burst in the late 1980s. In the 1986 tax overhaul, Congress sought to limit the ability for outside investors in real estate deals to set off income from their other businesses with losses in real estate. Doctors couldn’t reduce their reported medical income with losses from real estate.

But that reform would have had very little direct effect on Trump, whose primary income was from the real estate that generated the losses. He would have been using depreciation and deductions from real estate to offset income from real estate, which is perfectly fine and not a questionable tax shelter at all.

The president indicated Tuesday that something like this is exactly what explained his tax losses:

….you would get it by building, or even buying. You always wanted to show losses for tax purposes….almost all real estate developers did – and often re-negotiate with banks, it was sport. Additionally, the very old information put out is a highly inaccurate Fake News hit job! — Donald J. Trump (@realDonaldTrump) May 8, 2019

It is possible, of course, to incur actual losses from real estate investing. In our example above, if the guy with a five-percent $8 million mortgage could only charge $300,000 in the aggregate, he’d really have lost the $100,000 difference between his mortgage payments and his income. He would still get the depreciation charge, however, so he’d report an even larger, $475,000 loss on his taxes. Since his tax bill cannot go negative, he would get to carry that forward to offset income in later years.

And that is very important. Let’s say our guy loses money for the first ten years, but then the real estate market turns around and his rentals become profitable. He’ll have millions in accumulated losses from those years that will shield his income from taxes now that times are good. And a significant portion of those losses will not represent any actual cash payments he made because they arose from depreciation.

How much of Trump’s losses in the years the Times describes as a “decade of red” were produced tax deductions rather than cash going out the door? It’s not possible to tell based on what the Times reported. But we can safely say that the tax deductions were significant because, at the time, Trump just would not have had the liquid financial resources to actually lose $1 billion cash.

The most likely explanation for the expansion of the losses Trump reported was that he was expanding his real estate portfolio at the same time. In 1988, he bought The Plaza hotel for $390 million. In 1990, he opened the Trump Taj Mahal casino in Atlantic City, which reportedly cost $1 billion to build. The annual depreciation for just these two properties would likely be tens of millions of dollars. As he acquired more properties, he acquired more deductions.

And it seems very likely that the catastrophic collapse of the real estate market in New York City that lasted from 1988 until 1996 would have weighed on Trump’s fortune. Rents dropped by 15 percent in these years, and prices for condos and coops fell by more than 30 percent. The largest landlord in New York City went bankrupt and had to turn over his assets to his creditors. By Forbes’ estimate, his net worth fell from $1 billion in 1988 to $500 million in 1990.

Then there’s the prudishly naive notion that losses are a sign of a failing business, which operates throughout the Times story. That’s not the way the world works–especially not today. Amazon, now the most valuable public company in the world, was a money-loser when it had its initial public offering in 1997. It didn’t turn a profit until 2001. The company still has over $600 million of tax-loss carryforwards on its balance sheet. Amazon, like Trump in the 1980s, paid no taxes on last year’s $10 billion profits because of tax credits and deductions.

Trump, of course, was not running a high-flying tech company. He was an investor in real estate and a builder. But the ability to grow wealth, receive income, and expand a business while losing money for the purposes of the taxman is not one of the things Amazon or Silicon Valley have a monopoly on.

The ten years of tax information obtained by the Times do not paint a “bleaker” picture of Trump’s fortunes at all.