President Trump castigated the leaders of NATO allies to their faces during his trip to Europe this week, suggesting that many of them “owe massive amounts of money” to the alliance. Mr. Trump has a point, but he mischaracterizes the way it works.

What is Mr. Trump’s complaint?

“NATO members must finally contribute their fair share and meet their financial obligations, for 23 of the 28 member nations are still not paying what they should be paying and what they’re supposed to be paying for their defense,” he said.

Yes and No. NATO has a budget to cover common civilian and military costs, and some NATO-owned assets are also commonly funded when they are used in operations. The United States pays 22 percent of those costs, according to a formula based on national income. None of the NATO allies are in arrears on these contributions.

Mr. Trump is referring imprecisely to a goal NATO has set for each member to spend at least 2 percent of its gross domestic product on its own defense each year. He is correct that only five of the 28 members currently meet that goal, and they are the United States, Greece, Britain, Estonia and Poland.

Are NATO nations violating a rule?

No. The 2 percent standard is just a guideline, not a legally binding requirement. In 2006, even as the United States was increasing military spending because of the wars in Afghanistan and Iraq, European allies were shrinking their military spending. NATO defense ministers that year adopted a guideline suggesting that each spend the equivalent of 2 percent of its annual economic output on its military — but it was a target, not a rule, and not endorsed by heads of state.

Only in 2014, after Russia annexed Crimea and intervened militarily in eastern Ukraine, did NATO leaders meeting in Wales agree to the 2 percent standard, and even then they urged members to “move toward” that goal by 2024, still seven years away.

Gary J. Schmitt, a scholar at the conservative American Enterprise Institute, said Mr. Trump was putting it in layman’s terms and “doesn’t care whether it’s technically accurate.”

But Mr. Schmitt identified two problems: “One, because it’s not technically correct, it is too easily dismissed by the very folks he wants to put pressure on. Two, and more important, it tends to bury the point that we’re invested in European security for our own strategic reasons.”

Is Mr. Trump the first to raise this concern?

No. Presidents George W. Bush and Barack Obama both pressed NATO allies to increase military spending. It was a regular theme of Robert M. Gates, who served as defense secretary under both presidents. In his final policy speech before stepping down in 2011, Mr. Gates said Americans were growing impatient spending money “on behalf of nations that are apparently unwilling to devote the necessary resources or make the necessary changes to be serious and capable partners in their own defense.”

Mr. Obama raised it during a visit to Europe after Russia’s Ukraine intervention. “One of the things that I think, medium and long term, we’ll have to examine is whether everybody is chipping in,” he said. “And this can’t just be a U.S. exercise or a British exercise or one country’s efforts.”

One way Mr. Trump is different is that he has made this a far more consistent and far more intense theme of nearly every discussion he has about NATO. He may have better luck than his predecessors at badgering allies into increasing their spending simply because he has made it the essential condition of America’s relationship with the alliance.

Jens Stoltenberg, NATO’s secretary general, said last month that the number of alliance members that would meet the 2 percent target next year would rise to eight.

Do NATO allies owe the United States money?

“Many of these nations owe massive amounts of money from past years and not paying in those past years,” Mr. Trump said.

No. This is not a matter of members failing to pay dues. The allies arguably may have less capable militaries than they should have, but none of them owe anyone anything. “Europe may owe itself; it certainly owes nothing to the U.S.,” said Ivo Daalder, a former ambassador to NATO under Mr. Obama.

What does Mr. Trump mean when he says NATO should have had $119 billion more?

“If all NATO members had spent just 2 percent of their G.D.P. on defense last year, we would have had another $119 billion for our collective defense and for the financing of additional NATO reserves,” the president said.

He is offering an estimate of what NATO would have spent had all of its members abided by the 2 percent guideline, but there is no way to recover that money after the fact. “Citing the amount not spent over the years is fine,” said Alexander R. Vershbow, a former deputy secretary general of NATO, “but demanding back taxes is not justified and only alienates allies.”

Has this cost the United States money?

“This is not fair to the people and taxpayers of the United States,” Mr. Trump said.

Debatable. American experts have argued for years that Europeans can afford to have broader social programs that produce comfortable lives for their citizens partly because they spend so much less on militaries knowing they live under the security blanket of the United States. Overall, American military spending is 72 percent of the total spent by all 28 allies.

But the vast bulk of increased American military spending since the Sept. 11, 2001, attacks stemmed from the wars in Afghanistan and Iraq, which were instigated by the United States, not NATO. There is little indication that the United States would have spent less money in those wars if Belgium, Spain and Slovakia, for example, had spent more on their militaries.

Moreover, Mr. Trump has not argued that he wants to reduce American military spending. He has just proposed a 10 percent increase in the base defense budget.

A version of this article appears in print on , on Page A10 of the New York edition with the headline: Trump Says America’s NATO Allies Aren’t Paying Their Fair Share. Is That True?. Order Reprints | Today’s Paper | Subscribe