Tech entrepreneur Andrew Yang on Tuesday ended his bid for the White House.

"We've accomplished so much together," Yang said during a speech to supporters in Durham, N.H.

Yang suspended his campaign after initial results in New Hampshire's first-in-the-nation presidential primary indicated a second straight disappointing finish for the first-time candidate.

"While there is great work left to be done -- you know I am the MATH guy -- 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," Yang told supporters. "And so tonight, I am announcing I am suspending my campaign for president."

MEET THE NEW HAMPSHIRE VOTER WHO MADE $12G FROM ANDREW YANG'S 'FREEDOM DIVIDEND'

The end of the campaign was not totally unexpected: Yang had already let go of dozens of campaign staffers last week in the wake of a lackluster finish in Iowa's caucuses.

A senior Yang campaign adviser told Fox News that "the math was relentess. We needed to do better in one of both of the first two states and we didn't get it."

Though he didn't make it past the two early voting states, Yang's rise is remarkable for someone who was hardly famous before entering the race.

When Yang declared his candidacy two years ago, he was the longest of long shots for the Democratic nomination. But last year, thanks to the popularity of his proposed "Freedom Dividend" – a universal basic income that would pay each adult American $1,000 per month – and his unconventional and energetic approach to campaigning, Yang soared to middle-tier status in the polls. And his fundraising figures surged as well late last year early this year.

In his speech to supporters Tuesday, he claimed his message on the universal basic income had gone "mainstream" in the Democratic Party.

Speaking to one news outlet, Yang also expressed sadness over the end of the campaign.

“There’s part of me that feels disappointed, like I didn’t fulfill some people’s goals for this campaign,” Yang told BuzzFeed News. “There’s also a competitive part of me too — like I can’t believe I lost to these people.”