For Tesla, going mainstream doesn't come cheap.

Tesla plans to raise as much as $1.15 billion in stock and debt to have more of a cash cushion as it revs up for the launch of the Model 3, its first mass market car.

The electric car company said Wednesday it will offer $250 million in common stock and $750 million in convertible debt, with an option for its underwriters to buy up another 15% of the two offerings.

Elon Musk, Tesla's CEO, will purchase $25 million of the stock.

Tesla's stock rose 2% in after hours trading Wednesday following the announcement.

The capital raise comes as Tesla invests heavily in battery and car factories, as well as charging stations and solar tile production.

Related: Tesla may open 3 more Gigafactory locations

In its most recent earnings report, Tesla said it expects to invest as much as $2.5 billion before it kicks off Model 3 production, which is scheduled to begin in July.

On a conference call with analysts after the report last month, Musk teased the possibility of raising more funds.

"No capital needs to be raised for the Model 3, but we get very close to the edge," Musk said. "So we're considering a number of options, but I think it probably makes sense to raise capital to reduce risk."

Tesla turned a rare profit in the third quarter of 2016, after Musk implored employees to cut costs and "deliver every car we possibly can." But the company has otherwise been consistently unprofitable.

The company raised nearly $1.5 billion last May to help ramp up production for the Model 3.