Tesla ’s first-quarter earnings looked surprisingly great.

CEO Elon Musk even offered guidance for the rest of 2022.

Shares are higher in after-hours trading Wednesday

Tesla earned a record $3.22 per share from $18.8 billion in total sales, its highest total ever.

Wall Street was looking for earnings per share of about $2.20 to $2.30 from about $18 billion in sales.

In the fourth quarter of 2021, Tesla earned $2.54 a share on sales of $17.7 billion.

Operating profit came in at a record $3.6 billion,

compared with expectations for about $2.6 billion.

Even excluding credit sales, operating profit was a record

and much better than Wall Street expected.