President Donald Trump complained on Thursday that America was shelling out a "vast fortune" to developing countries through the United Nations Green Climate Fund, thanks to the Paris Agreement.

But the total number may be less than meets the eye.

"Beyond the severe energy restrictions inflicted by the Paris accord, it includes yet another scheme to redistribute wealth out of the United States through the so-called 'green climate fund' — nice name — which calls for developed countries to send $100 billion to developing countries," Trump said.

More from NBC News:

As Trump quits climate pact, states step in

Casino robbery ends with dozens dead at resort in Philippines

Fact checking Trump's Paris agreement speech

In making his case, Trump appeared to be mixing up two elements of the Paris Agreement that have different price tags for the United States and for the world.

On the one hand, there's the United Nations Green Climate Fund, which helps finance renewable energy and infrastructure to deal with the effects of climate change in the poorest and most vulnerable countries.

On the other hand, there's a broad pledge to eventually raise $100 billion a year globally — not just by the United States — to help developing countries mitigate climate change. The United Nations Green Climate Fund counts as part of that pledge, but the overall picture is more complicated.

As Trump mentioned later in his speech, the United States has given the Green Climate Fund $1 billion already. President Barack Obama pledged a total of $3 billion to the fund by 2020 as part of a global goal of $10 billion, but Trump promised not to finance it as a candidate and Congress has not made further contributions since the election.

Trump described this amount as "costing the United States a vast fortune," but it's a minuscule portion of the budget, where total federal spending in the 2016 fiscal year was $3.9 trillion. For perspective, the White House's recent budget proposal contained an apparent $2 trillion accounting error — a number 1,000 times as large as the remaining $2 billion commitment to the fund.

There are multiple arguments for this funding. One is a matter of fairness: The largest polluters by far have been developed nations like the United States. Another is a matter of effectiveness: Fast-growing countries like India are building the next generation of power plants and the Paris Agreement won't work unless they decide to forgo dirtier forms of energy like coal. The goal of the funding is to help nudge developing countries towards cleaner energy like wind and solar instead.

If the funding succeeds in lowering emissions and preventing a major temperature increase, the United States reaps the economic benefits as well. And by helping countries that are especially vulnerable prepare for the effects of climate change, they could prevent or minimize future refugee crises that could destabilize regions and spill over into the developed world.

The other number Trump mentioned was goal of eventually mobilizing $100 billion per year to help poorer countries combat climate change, which was first announced in 2009 at the Copenhagen climate conference.

J. Timmons Roberts, a researcher at the Brookings Institution who tracks climate spending, described the commitment as more complex and often indirect than aid through programs like the Green Climate Fund.

In addition to being spread out around the developed world, the $100 billion goal is much more vague. The number includes not only foreign aid, but private sector investments as well, and there's a lot of wiggle room over what counts towards the total.

An Organization for Economic Cooperation and Development analysis in 2016, for example, predicted pledges worldwide would add up to $67 billion per year by 2020 — a major step towards the target. But countries like India have complained similar estimates have been massively inflated by items like private loans to buy green technology from developed nations that are closer to ordinary business transactions than foreign aid.

Roberts said there's some merit to their complaints: He examined $10 billion of pledged 2012 aid with the think tank consortium Adaptation Watch, for example, and concluded only about $2.3 billion could be clearly verified as such.

In a possible gesture to these funding issues, Trump indicated that the $100 billion goal could increase significantly.

No matter how it's calculated, though, the Paris Agreement is not a binding treaty and the United States is not legally obligated to provide any specific amount. That means Trump would have been free to remain in the agreement without spending another dollar as president.

WATCH: Vladimir Putin responds to Trump's decision to leave Paris climate accord