In 1964, President Lyndon B. Johnson declared an “unconditional war on poverty in America.” Two decades later, Ronald Reagan declared that poverty had won. But had it?

Worldwide, the fraction of humans living in extreme poverty (defined by the U.N. as less than $1.90 per day) declined from more than 80 percent in the early 1800s to less than 10 percent today. This is despite a sixfold increase in the world population. Since the 1990s, the absolute number of people living in extreme poverty has fallen by 60 percent, while the population has increased almost 40 percent.

So something good is clearly happening globally, but what? And what of the United States?

Since 1967, the United States has spent more than $20 trillion (adjusted for inflation) fighting poverty, more than five times the inflation-adjusted cost of World War II. What has the United States gained for such a sum? By the official numbers, a relatively constant 15 percent poverty rate, year after year, for more than half a century. Maybe Reagan was right. This is what losing a war on poverty would look like.

Of course, we can’t know that the trillions were wasted because we don’t know how bad poverty would have been otherwise. We know that the United States could have completely eliminated poverty more than a half-century ago simply by cutting a check each year to each poor person for (in today’s dollars) around $10,000. That would have cost the same $20-plus trillion.

And the government could have achieved this solution with zero additional bureaucratic infrastructure. All Americans report their incomes to the IRS annually, and each year the IRS cuts checks to millions of Americans for tax rebates. A couple of lines of code in the IRS’s software would have been all needed to implement this plan.

Why didn’t we do this? Because with $20 trillion on the table, politicians, bureaucrats and entrepreneurs come out of the woodwork to find ways to get some of that money for themselves. And so today, we have more than 100 federal programs to fight some aspect of poverty, each of which is supported by political, bureaucratic and entrepreneurial constituencies who thrive on that federal money. Worse, these constituencies benefit from poverty because, when poverty persists, so does the taxpayer money to fight poverty.

Plainly, massive government spending didn’t work. But what did work is also plain to see.

Countries whose governments focus their efforts on crafting and enforcing clear and just laws, on ensuring impartial judiciaries, on maintaining sound currencies, and on protecting property rights and simplifying their regulatory regimes — that is, countries that are more economically free — tend to exhibit lower poverty rates.

The average poverty rate among the less economically free countries is more than 50 percent. The average poverty rate among the more economically free is under 15 percent. And the pattern persists, even among the poorest countries. The average poverty rate among poor and economically free nations is 82 percent, versus 93 percent among the poorer and economically unfree countries.

We fought a war on poverty in the United States, and the bureaucracy won. Yet, poverty in the United States is not extreme, not by a long shot. And extreme poverty in the rest of the world is vanishing, bit by bit, day by day. And for that, we have economic freedom to thank.