Andrew Yang, an entrepreneur whose signature policy included giving all adults a monthly stipend, has ended his quest for the presidency, he confirmed Tuesday shortly after the polls closed in New Hampshire.

"You know I am the math guy, and it is clear tonight from the numbers that we are not going to win this race," he told supporters at an election night rally in Manchester, N.H.

“We’ve accomplished so much together,” Yang said. “We have brought a message of humanity first and a vision of an economy and society that works for us and fellow Americans.”

Yang said his campaign highlighted real problems that communities face as the economy is being transformed by technology and automation. A universal basic income has become part of the mainstream conversation, he said.

Yang's candidacy comes to an end after an unexpected rise last year in which he outlasted a New York City mayor, former and current governors, and even several U.S. senators in his quest for the presidency. Despite being relatively unknown when he first announced his candidacy, Yang grew an energetic and passionate base – known as the Yang Gang – that propelled him into a household name.

From the fall::Andrew Yang has defied expectations. Can he turn that into a 2020 win?

Yang, 45, is the founder of the nonprofit Venture for America, and before announcing his campaign for presidency, had never run for elected office. The Obama administration selected him in 2012 as a “Champion of Change” and in 2015 as a presidential ambassador for global entrepreneurship.

He filed to run for president in November 2017, earlier than anyone else in the Democratic race except for Rep. John Delaney, D-Md., who dropped out before the Iowa caucuses.

More:Who is still running for president in 2020? An interactive guide

Yang was a nontraditional candidate. He frequently wore hats with "MATH" emblazoned across them, an acronym for "Make America Think Harder."

Despite his outsider status, Yang qualified for all the Democratic debates except one, besting several career politicians with longer time in public service to make the stage.

His candidacy was able to survive in large part because of his devoted following. The Yang Gang would often flood social media sites in support of Yang, and supporters criticized media outlets, such as MSNBC, for their coverage of the candidate. Yang briefly boycotted MSNBC in December after the network excluded him from polling graphics. Yang also criticized the network for his low speaking time November's Democratic primary debate, which was moderated by MSNBC and The Washington Post.

But Yang frequently took a lighthearted approach to his campaign, jovially sparring with fellow candidate Sen. Michael Bennet on Twitter before a debate, doing the cupid shuffle, and chomping on a turkey leg as he strolled through the Iowa State Fair.

Yang’s campaign website listed more than 100 proposals he would have committed to as president, advocating for LGBTQ rights, automatic voter registration and reducing student loan debt, among other progressive policies.

But the defining feature of his platform was his proposal for a universal basic income, or a “Freedom Dividend” as he called it.

“This form of UBI that he is proposing for the United States is a set of guaranteed payments of $1,000 per month, or $12,000 per year, to all U.S. citizens over the age of 18,” his website said.

But Yang was never able to crack into the top tier of candidates. As of Feb. 10, his national polling average was 3%, according to RealClearPolitics.

Still, the entrepreneur exceeded expectations throughout his time in the race, especially with his fundraising hauls. In the fourth quarter, he raised $16.5 million.

Yang was not competitive in Iowa, where he got only 1% of the state delegate equivalent total. He received no national delegates after the race. The trend continued into New Hampshire.

Contributing: Michael Collins