Critics of President Donald Trump’s Twitter announcement barring transgender Americans from the military were quick to shoot down his rationale of "tremendous" health care costs.

Viral expenditures that supposedly cost less money than transgender troops’ health care included Defense Department spending on Viagra, building a fraction of the border wall and Trump’s own trips to Mar-a-Lago.

Some of the more prevalent examples contained more truth than others.

What the medical estimates say

Trump’s move reverses President Barack Obama’s 2016 policy that ended the service ban on transgender Americans. As many as 250 service members have asked to formally change their preferred genders, or have already been approved, the Associated Press has reported.

The Pentagon commissioned a report in 2015 to look at the number of transgender troops (the Defense Department did not keep track) and how integrating them would affect military budgets. The RAND Corporation released the report in June 2016.

The think tank estimated that there were between 1,320 and 6,630 active duty transgender personnel, and between 830 and 4,160 in the reserves. The midrange estimates were for 2,450 active duty and 1,510 reserve duty service members.

Only a fraction of active duty transgender service members were likely to seek medical treatment, the study said. RAND gave a high-end estimate that of active-duty troops, 130 would want gender transition–related surgeries and 140 would want transition-related hormone therapy.

The cost for these procedures would range from $2.4 million to $8.4 million per year, an increase of 0.4 to 0.13 percent in health care spending. That is, according to the report, "an amount that will have little impact on and represents an exceedingly small proportion of (Active Component) health care expenditures ... and overall DoD health care expenditures."

Another study published in the New England Journal of Medicine in September 2015 determined that 12,800 service members would be eligible for transgender health care, and 188 would use those benefits for transition services, at a cost of $4.2 million to $5.6 million.

Viagra and ED drugs

Liberal website Think Progress was one of many websites that tweeted an especially provocative statistic, saying that the military already spends 10 times more on erectile dysfunction prescriptions.

Military spends 10 times as much on erectile dysfunction as it would on transgender medical care https://t.co/ZsPdKzoCab pic.twitter.com/22oGMbrYeJ — ThinkProgress (@thinkprogress) July 26, 2017

According to a widely cited news article, the numbers are right, but there are some details to consider.

This post and others referred to a Feb. 13, 2015, Military Times analysis of Defense Health Agency data that showed in 2014, the Pentagon spent $84.24 million on 1.18 million prescriptions for eight different erectile dysfunction drugs like Cialis and Levitra. That accounts for the comparison being 10 times higher than the RAND Corp.’s high-end estimate of $8.2 million.

The tab for Viagra alone, which was prescribed more than 905,000 times, was $41.6 million. Some outlets chose to focus on how the bill for that particular drug was five times higher than the RAND estimate.

Most of those prescriptions weren’t for troops in the field, although erectile dysfunction had doubled among active-duty personnel between 2004 and 2014.

Almost 103,000 prescriptions were for active-duty service members in 2014, at a cost of $7.67 million. More than half the cases were for psychiatric rather than physical causes.

Trips to Mar-a-Lago

Liberal website DemocraticUnderground.com tweeted a comparison to Trump’s travel costs to Mar-a-Lago, his Palm Beach, Fla., clubhouse resort.

"Transgender troops’ med.care: $2.4-$8.4 million/year. Trump trips to Mar-A-Lago: $20 million in first 80 days."

Transgender troops' med. care: $2.4-$8.4 million/year. Trump trips to Mar-A-Lago: $20 million in first 80 days https://t.co/L5ildomwkc pic.twitter.com/0f8bBveRc0 — DemUnderground (@demunderground) July 27, 2017

Yes, Trump's multiple weekends at Mar-a-Lago likely cost taxpayers millions. But there are just too many variables, from staffing to security to what aircraft or vehicles are being used, to use the same dollar figure.

The tweet cited an April 11, 2017, CNN story that said Trump’s six weekend trips up to that point, a total of 21 days, cost more than an estimated $20 million. But the story also acknowledged that estimating the real costs associated with those trips is difficult.

CNN’s estimate was based on a 2016 Government Accountability Office report that determined a four-day trip President Barack Obama took in 2013 cost the Secret Service and Coast Guard about $3.6 million. Obama actually visited two cities on that trip, to Chicago and Palm Beach.

It’s the best estimate anyone has, but the author of that GAO report has told us it’s not fair to assume that those costs are typical for presidential travel. We also shouldn’t assume that Obama’s 2013 trip and Trump’s 2017 trips have similar price tags, even though both presidents went to Palm Beach.

Military band budget

James Hamblin, senior editor at The Atlantic, tweeted that the costs of providing care to transgender service members "would cost about 1% as much as the military spends on bands."

Medical care for transgender soldiers would cost about 1% as much as the military spends on bands. https://t.co/se9lGRlL2s — James Hamblin (@jameshamblin) July 26, 2017

Hamblin is not off-key with this statement.

The tweet linked to his own story in The Atlantic, which noted that in a defense budget projected to be as high as $640 billion, "military bands cost taxpayers $437 million."

The article cited a July 1, 2016, New York Times story about how the Defense Department did fund more than 130 military bands with more than 6,500 members in the prior year with $437 million. But the story also said the U.S. House had passed bills placing limits on activities and expenses.

The House Armed Services Committee added a line to the National Defense Authorization Act that said the committee "believes that the services may be able to conserve end strength by reducing the number of military bands," the New York Times reported.

Military branches had already started to cut back on band spending, but according to the Times, that $437 million — essentially three times the annual National Endowment for the Arts budget — "still dwarfs all other federal spending on music."

The border wall

ABC News political analyst Matthew Dowd tweeted that transgender health services in the military "could be paid for by less than 1/4 mile of border wall" between the United States and Mexico.

Fact: any extra costs because of transgender folks in military could be paid for by less than 1/4 mile of border wall. Lordy Moses! — Matthew Dowd (@matthewjdowd) July 26, 2017

This one is a bit difficult to pin down but is a defensible statement, given that estimates vary widely over the actual cost of a border wall. Details about how high it would be or how many miles it would cover aren’t available.

The border with Mexico is almost 2,000 miles, with about 650 miles of fencing already in place. But Trump has said that the wall may only have to be 1,000 miles, because of natural obstacles and barriers.

The Associated Press reported in March that the Trump administration wants to build a 30-foot-high border wall that "looks good from the north side and is difficult to climb or cut through," according to a pair of contract notices posted to a government website. Trump has sometimes discussed a wall as high as 55 feet, adding features such as solar panels or transparent sections so that Americans can see "when they throw the large sacks of drugs over."

So, dollar figures to build the wall are fuzzy and far-ranging.

During his presidential campaign, Trump’s own estimates wavered between $4 billion and $10 billion. Other estimates go from $12 billion to as high as $70 billion. A February 2017 report from the Department of Homeland Security put it at $21.6 billion.

But Congress has already dedicated funds to building or replacing border fencing for the current year. For the current year, Congress had already set aside funds for 40 miles of fence: $175 million for 24 miles in El Paso, Texas; $15 million for 2 miles in El Centro, Calif., and $102 million for 14 miles in San Diego.

That’s more than $7 million per mile in each case, topping $1.8 million per quarter-mile.

That’s less than RAND’s low-end estimate of $2.4 million on annual spending for transgender health care, but there’s other spending to consider.

A House Appropriations Committee report for fiscal year 2018 recommended $1.57 billion for the wall, including $784 million for 32 miles of new fencing in Texas’ Rio Grande Valley and $251 million for 14 miles of secondary fencing in San Diego. (Politico said Trump made his announcement in part to help secure wall funding by appeasing lawmakers who didn’t want the Defense Department paying for gender reassignment surgeries.)

That breaks down to an average of $24.5 million per mile in Texas and about $18 million per mile in San Diego, the Dallas Morning News reported. That would be $6.125 million per quarter mile in Texas and $4.5 million in California.

Those figures are within RAND’s estimated costs for military health care spending.