Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Andrew Yang, a New York businessman whose unusual presidential campaign rose to prominence with a plan to give Americans $1,000 a month, is dropping out of the Democratic race.

Initially seen as a long-shot candidate, Yang used a savvy social media strategy to garner legions of devoted followers who referred to themselves as the "Yang Gang."

Addressing supporters in New Hampshire on Tuesday night, Yang said: "While there is great work left to be done, you know I am the math guy, and it is clear tonight from the numbers that we are not going to win this race. I am not someone who wants to accept donations and support in a race that we will not win. And so tonight I am announcing I am suspending my campaign for president."

Download the NBC News app for breaking news and politics

Yang, 45, launched his bid for the presidency in late 2017.

A lawyer turned entrepreneur and author of a book called "The War on Normal People," Yang appealed to voters by warning of the ills of technology— including automation and artificial intelligence. Yang's plan for a universal basic income— the $1,000 a month check that he dubbed the "Freedom Dividend"— served as a bedrock for his larger vision for fixing a society deeply sickened by capitalism.

"Democrats still have not asked themselves the hard questions as to how Donald Trump won in 2016," Yang said in December. The party is acting like "Trump is the cause of all our problems. He’s a symptom and we need to cure the underlying disease."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Mental health was among his top campaign priorities, and he often spoke about the suicide and substance abuse crises in America.

The lone candidate of color remaining on the December and February debate stages, Yang frequently joked about Asian American stereotypes faced by his community.

After he qualified for the first Democratic presidential primary debate last June, Yang said he was hoping he could stand next to former Vice President Joe Biden "so the country can Google, 'Who's the Asian man next to Joe Biden?' and then they will discover Andrew Yang."

The married father of two made a bit of odd history by showing up for the nationally televised debate without a tie — a look he repeated as he kept hitting the fundraising and polling thresholds to qualify for subsequent debates as numerous well-known politicians kept falling out of the race.

He also used some reality show-type flare for September's presidential debate, promising something "big" and "unprecedented." In his opening statement, Yang announced, "My campaign is now going to give a Freedom Dividend of $1,000 a month to 10 American families for an entire year, someone watching this at home right now."

"It's original. I'll give you that," said the next candidate to speak, Pete Buttigieg.

In addition to his fan base online, his supporters would often show up at events wearing "MATH" hats, a reference to his slogan, "Make America Think Harder." Yang also pulled in a number of celebrity endorsements, including comedian Dave Chapelle, Tesla founder Elon Musk and actor Donald Glover.

A senior adviser to the Yang campaign told NBC News the timing of his departure was also built on "math."

“There comes a time where you look to see what a path to victory can and should be, and he’s willing to let the numbers guide his decision making, ” the aide said in reference to the delegates needed to make it to the Democratic National Convention.

“At the end of the day, the American people and the democratic electorate are scared, and they’re looking for a comfortable answer to the question: what is it going to take to beat Donald Trump?” the aide said.

Yang attracted progressives, libertarians and disaffected Republicans to his campaign with a message of working across party lines and said he would urge his supporters to vote against Trump.

“I'm really proud of the fact that I've activated and energized many people that are new to politics,” he told reporters this week. “I don't think they're going anywhere. I think that we can be this movement that keeps on pushing until we actually get some of these solutions across the finish line.”

Earlier Tuesday, Yang hinted at a future run in 2024.

“As long as the problems are still there, I’d like to help solve them,” he said. “So certainly I am very open to running again if that's the best way to serve.”