Billionaire investor Mark Cuban said Thursday he is considering running for president as an independent.

He said his decision on challenging President Donald Trump, whom he has criticized, hinges on whether his wife and family would allow it.

I would run as a "Republican before Democrat and most likely independent," Cuban said at The New York Times DealBook Conference.

"I think there is an incremental value for setting up an independent candidacy. ... The benefit of being an independent is you go right to the golden ticket time, if I get enough support in the polls then I get to participate in the debates."

Cuban admitted it would be difficult to set up the infrastructure for an independent candidacy for president but believes it is the best way to challenge Trump.

When asked if he would consider running as a Democrat, Cuban replied: "No, absolutely not."

The entrepreneur and "Shark Tank" panelist is the owner of the NBA's Dallas Mavericks. He sold Broadcast.com to Yahoo for about $5.7 billion in 1999. The investor has a net worth of $3.3 billion, according to Forbes.

Disclosure: CNBC owns the exclusive off-network cable rights to "Shark Tank," which features Mark Cuban as a panelist.