Tesla has reported a smaller-than-expected drop in quarterly profit as a string of price increases on its electric vehicles (EVs) helped offset production challenges caused by Covid-19 lockdowns in China.

Chief Financial Officer Zachary Kirkhorn said Tesla was still pushing to reach 50% growth in deliveries this year, adding that while the target had become more difficult, "it remains possible with strong execution."

Chief Executive Elon Musk said he expects inflation to start easing by end-2022 and most commodity prices to stabilize.

Tesla does not have a demand problem, but a production problem, Musk told a conference call.

He dismissed the idea that global economic problems were hurting interest in Tesla, despite vehicle prices' rising to what he called "embarrassing levels."

The US price of Tesla's Model Y long-range version, now $65,990, is up more than 30% since the start of 2021.

Shares of Tesla were up about 1% in after-hours trade. The shares are down about 40% from their peak in November.

Tesla's China factory ended the second quarter with a record monthly production level.

Musk said new factories in Berlin and Texas aimed to produce 5,000 cars a week by the end of the year, adding that Berlin produced 1,000 cars a week in June.

Musk previously had said the new factories were "gigantic money furnaces" and that he had "a super bad feeling about the economy."

Morgan Stanley analysts said in a report after Tesla's earnings announcement that they see "near-term margin headwinds due to (new) challenges with ramping new production, particularly in Berlin".

Tesla executives acknowledged some continuing tightness in supplies of older-generation microchips, but said there were no major problems in supplies of chips and batteries barring unforeseen Covid-related shutdowns.

The EV maker posted an adjusted profit of $2.27 per share for the quarter versus analysts' consensus estimates of $1.81. This was down from $3.22 in the preceding quarter.

Its automotive gross margin fell to 27.9%, down from a year earlier and the preceding quarter, amid inflationary pressure.

Tesla's total revenue fell to $16.93 billion in the second quarter from $18.76 billion a quarter earlier, ending its streak of posting record revenue in recent quarters.

Analysts were expecting revenue of $17.10 billion, according to IBES data from Refinitiv.