In July, Donald Trump tweeted that he is working to ban trans people from the military, citing “tremendous medical costs” as a reason for doing so. Now a study finds that it will be much more expensive to purge the military of transgender people than it would be to just remain open.

….victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail. Thank you — Donald J. Trump (@realDonaldTrump) July 26, 2017

A report from the Naval Postgraduate School in Monterey, California, and the Palm Center estimates that it would cost $960 million to fully implement Trump’s transgender ban, while the “tremendous” medical costs would be, at most, $8.4 million a year.

Compared to the over $40 million a year the military spends on Viagra, and that’s a bargain.

The $960 million estimate is the cost of replacing all trans people currently in the military. The report estimates that it costs an average of $75,000 to recruit and train someone in the military, and it estimates that there are 12,800 transgender people in the military (based on the 15,500 number floating around, but adjusted for a downsized military and excluding reserves).

$75,000 x 12,800 = $960 million.

The cost could be lower since not all transgender people in the military will be found and discharged. Moreover, a transgender person who gets dismissed will have worked for the military for some period of time, so the value lost to the military is only part of the cost of recruiting and training a servicemember, not the full cost.

On the other hand, the cost could be higher since the procedures to find and discharge transgender servicemembers aren’t free; investigators and lawyers will have to work on thousands of cases, racking up costs for the military. Also, this estimate is just for the transgender people currently in the military; presumably transgender people will sign up for military service each year this ban is in effect, get trained, and then get discharged.

If there are more than 12,800 transgender people in the military (that number is based on survey data and many trans people might not be comfortable identifying themselves as such on a survey), the armed forces could stand to lose even more workers they paid good money to recruit and train.

Banning transgender people from the military is morally wrong and serves no purpose. But if Trump wants to talk numbers, then we should be ready to argue that the numbers aren’t on his side either.