After faltering earlier this year, shares of electric-vehicle pioneer Tesla (TSLA 2.87%) have been on a tear since the beginning of April. Indeed, Tesla stock has surged 32% over that period, despite falling 5% on Tuesday due to fears of a U.S.-China trade war.

The recent rally in Tesla stock appears to have been driven by rising confidence in the company's ability to reach its target of building 5,000 Model 3 units per week by the end of this quarter. CEO Elon Musk has tried to provide ammunition for this rally, recently tweeting that Tesla bears' short positions will "explode" in a few weeks (i.e., early July).

TSLA Chart

Tesla Stock Performance, data by YCharts.

However, achieving a Model 3 production rate of 5,000 per month by itself won't justify the lofty stock price. Tesla needs to sustain a much higher production rate while also improving the company's profitability dramatically. Together, those tasks represent a much greater challenge for Tesla.

Can Tesla hit its profit goals with a $35,000 car?

While Tesla introduced the Model 3 as a $35,000 car and has often talked about it in those terms, it has only been selling much more expensive variants so far. For nearly a year, the only version of the Model 3 being sold had a starting price of $49,000. Recently, the company began building the dual-motor version of the Model 3, which has an even higher starting price of $78,000.

Nevertheless, Tesla's Model 3 gross margin was negative in the first quarter and the company has projected that it will be around breakeven in the second quarter. That said, low production rates up until now have held back Model 3 profitability.

In the second half of 2018 -- when Tesla hopes to churn out 5,000 Model 3 vehicles per week -- the company expects Model 3 gross margin to be "highly positive", but still below the long-term target of 25%. The current goal is to achieve a 25% gross margin in 2019.

A Tesla Model 3 parked on a road, with a green field in the background

Tesla Model 3 production hasn't turned profitable yet. Image source: Tesla.

However, if Tesla will only achieve a roughly 20% gross margin by building a super-premium mix of Model 3s in late 2018, it's extremely doubtful that it can hit its 25% gross margin target next year if it shifts production dramatically toward the $35,000 base model. (Last month, Musk tweeted that Tesla would "die" if it tried to build a $35,000 Model 3 today.)

Is demand high enough to sustain production plans?

This ties into Tesla's second major long-term problem. The higher Tesla needs to price its cars to meet its margin goals, the harder it will be to sell enough of them to meet production targets.

Tesla bulls, like my colleague Daniel Sparks, argue that there is a huge amount of untapped demand for the Model 3 (and other Tesla products). After all, Tesla has hundreds of thousands of outstanding Model 3 reservations with no formal marketing support -- and limited opportunities for word-of-mouth promotion thus far.

But on the flip side, since the initial surge of reservations, order activity has fallen off a cliff. This suggests that there was significant pent-up demand for an attractive and reasonably priced electric car, but that demand might be lower than bulls think once Tesla fills the orders from its biggest fans. Indeed, Tesla has taken reservations for about 500,000 Model 3s over the past two-plus years, whereas it wants to consistently sell 500,000 Model 3s a year going forward.

In the not-too-distant future, Musk hopes to build the forthcoming Model Y crossover at a rate of 1 million annually. Bulls seem to be counting on future production levels of this magnitude -- even though it would dramatically exceed the level of demand Tesla has demonstrated thus far.

Don't be fooled by artificial milestones

It's impossible to be sure of what Elon Musk meant when he tweeted about Tesla short positions "exploding." However, the most likely explanation is that Tesla is on track to build 5,000 Model 3s in the last week of June and will announce that milestone in its quarterly deliveries report in early July. To achieve this production target, Tesla recently set up a second assembly line in a semi-permanent tent-like structure next to its Fremont factory.

This mad scramble to churn out cars may enable Tesla to hit a Model 3 production rate of 5,000 per week by the end of June. But investors shouldn't confuse the company's ability (or inability) to hit an artificial production target during one particular week for long-term success.

Tesla currently carries a market cap in line with large and highly profitable global automakers. To live up to this valuation, Tesla will ultimately need to build and sell well over 1 million vehicles a year while achieving a very high profit margin. At the moment, it seems doubtful that there will be enough demand for Tesla to reach the production levels that bulls expect while maintaining the lofty price points that it needs to hit its margin target.