MENLO PARK, Calif. — After months of anticipation, Facebook on Thursday set the share price for its first public stock offering at $38, as the social-networking giant made final preparations for a record-breaking market debut today.

At that price, the planned stock sale is expected to raise $18.4 billion for the company and attract some early investors, making it the second-biggest offering of any U.S. company in history in terms of dollars raised, behind Visa’s $19.6 billion debut in 2008.

More significantly, the price sets a total value for Facebook at $104 billion, giving it a greater worth than any other U.S. company at its stock market debut. Only two companies in the world have debuted with higher market values than Facebook’s, according to data-tracking firm Dealogic; both were Chinese banks.

Facebook’s IPO involves only a small portion of its estimated 2.74 billion shares outstanding, which are held by a combination of investors and insiders, including co-founder and chief executive Mark Zuckerberg.

“There’s no question: It’s a lot of money. It’s evidence that entrepreneurs in the United States have been able to create extraordinary value with creative thinking,” said Larry Harris, a professor of finance and business economics at the University of Southern California’s Marshall School of Business.

Public trading of Facebook stock is set to begin today on the Nasdaq exchange, under the symbol “FB.” To kick things off, the company was holding its 31st official all-night “hacka- thon” starting Thursday evening at Facebook headquarters, where employees will be free to work on any project that interests them.

Early interest in the new stock was so high that Facebook this week raised the potential range of its IPO price, which was originally listed as $28 to $35.

A study on social media use released earlier this month found that people who spent excessive time on Facebook also made riskier decisions -- performing as poorly in a famous psychological test as people dependent on substances such as cocaine or heroin.

Amazon is planning to use its massive cloud computing service to jump into the streaming market for video game play, according to a new report from the Information. The service, which could potentially bring top-notch titles to virtually anyone with a smartphone or streaming device, could make Amazon a major competitor in the space already in play by Microsoft and...