Spencer Platt / Getty

Every so often, an extremely wealthy person decides that they should use their riches to mount a long-shot bid for the presidency. Ross Perot did it twice and failed. Steve Forbes also did it twice and failed. But Donald Trump won. And although his celebrity was a much more important factor than his wealth, he inspired two very rich people to mount long-shot bids to challenge him in 2020.

Almost no one thought that the California businessman Tom Steyer would win the Democratic nomination. Nevertheless, he spent roughly $250 million before dropping out of the race last week.

What else could the billionaire have done with that sum? He could have saved 108,700 lives in countries stricken by malaria, if the effective-altruism organization GiveWell is correct that the Malaria Consortium saves a life for each $2,300 it spends. (Diminishing marginal returns might reduce the actual figure to many tens of thousands of lives saved.) He could have paid for four years of tuition and fees for 9,000 low-income students at California State University, Dominguez Hills. He could have seeded a super PAC with more than the total amount President Trump has raised for his 2020 reelection campaign.

Michael Bloomberg, another billionaire, ran an even costlier campaign for the presidency. According to Politico, the former New York mayor spent in excess of $500 million before dropping out of the race this week and endorsing Joe Biden.

That amount of money is in the range of what it costs to develop a vaccine for an infectious disease. Alternatively, Bloomberg could have fully funded ProPublica, the investigative-journalism nonprofit, for roughly 20 years, or purchased a house for every homeless person in New Mexico.

The point isn’t that Steyer and Bloomberg don’t do enough for charity. Other articles about the opportunity costs of their campaigns tend to leave out that Steyer and his wife, Kat Taylor, reportedly donated $190 million to charity from 2009 to 2017, while Bloomberg donated $3.3 billion last year alone. Both men already do more for charity than the typical billionaire.

Still, their campaigns were extremely wasteful investments. At best, they produced very little value. At worst, they arguably influenced the presidential race in ways that the billionaire candidates disliked. For example, Bloomberg’s presence in the race arguably helped Bernie Sanders. Given the dismal rate of return, one can’t help but see their vanity campaigns as acts of hubris, and lament all the good that could have been done with the large amounts of money they squandered.

That’s worth noting not to demonize either of them, but as a lesson for the next billionaire who starts thinking about his or her ambitions or legacy and ponders a run for the presidency: Don’t do it! Instead, call a press conference, admit that politics tempted you, then tell the world about the awesome project you’re going to launch instead with your millions. The opportunity cost of that decision? Winning six delegates in American Samoa.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.