Once again, President Donald Trump is blasting NATO allies for failing to pay enough for their defense. And once again, by mistake or design, Trump isn’t getting NATO funding quite right. “The US is paying for Europe’s protection, then loses billions on Trade. Must pay 2% of GDP IMMEDIATELY, not by 2025,” the President tweeted from Brussels, Belgium, where he is meeting with other NATO leaders at an annual summit. Trump had been on a tear even before he arrived in Brussels, declaring Tuesday that “many countries in NATO, which we are expected to defend, are not only short of their current commitment of 2% (which is low), but are also delinquent for many years in payments that have not been made. Will they reimburse the U.S.? Again and again, Trump has pushed the idea that allies in the North Atlantic Treaty Organization owe the US money. That’s not how alliance funding works. Here’s how it does: NATO was formed after World War II on the principle of collective defense: An attack on one or more members is considered an attack against all. It’s been invoked only once – to help the US after the September 11 terrorist attacks. For collective defense to work, the 29 members have to keep their armed forces in good shape, so NATO sets an official target on how much they should spend, which they call a “guideline.” That stands at 2% of GDP. There is no penalty for not meeting the 2% target. Each country decides how much it is going to spend and what it will spend on. If one country spends less or more than the guideline, other countries are not obliged to follow suit. And despite Trump’s repeated suggestion that NATO members owe the US, members do not pay each other. NATO members do contribute to a collective budget for the alliance. There’s a civilian budget of about $286 million for 2018, used mainly to fund the NATO headquarters in Belgium and its administration. And there’s a military budget of $1.54 billion for 2018, which is used to fund some operations and the NATO strategic command center, as well as training and research. That is a fraction compared with overall spending on defense by member countries, which NATO estimates will total more than $936 billion in 2018. There is also a joint budget for the NATO Security Investment Programme, which covers major construction and command and control system investments. The budget for that program is capped at $817 million for 2018. Member countries contribute to these NATO budgets in accordance with an agreed cost-sharing formula based on gross national income. The US pays 22.1% of these budgets, while Germany pays 14.8%, for example. All members are up to date on these contributions. Trump isn’t the first US president to push for higher defense spending by other NATO members. In 2014, at a NATO summit in Wales, President Barack Obama pushed for more spending by members who were falling short of the 2% target. The summit ended with a group pledge to move toward the target within a decade. The alliance was galvanized that year by Russia’s invasion of Crimea, and again in 2015 with the rise of ISIS. Rising spending That 2014 pledge appears to be holding. The alliance as a whole increased defense spending for the first time in two decades in 2015. Spending is rising across the board for European members of NATO and in Canada as well, increasing by 3.14% in 2016 and a whopping 5.27% in 2017. Since taking office, Trump has boosted US funding for the US military presence in Europe by 40%. In 2016, 22 of 28 NATO members increased their defense budgets. Last year, after Montenegro became the newest member, 28 out of the 29 alliance members – all but Canada – increased their defense spending again, boosting it by 1.8% or $17 billion. Right now, only five NATO members are expected to meet the 2% target by the end of 2018: the US, Greece, Estonia, the UK and Latvia. Another three – Poland, Lithuania and Romania – don’t quite meet the 2%, but NATO expects them to within the year. The remaining 21 are lagging, although most have increased spending. Germany, which came in for Trump’s special ire this summit, is set to spend 1.24% of its GDP on defense in 2018. France is at 1.81% of GDP and Spain is spending 0.93%, while tiny Luxembourg, which had fewer than 1,000 troops in its military last year, is set to spend 0.55% of its GDP on defense in 2018. Belgium, which hosts NATO, is on track to spend 0.93% of its GDP for this year.