It's becoming less expensive than ever to buy an electric vehicle. Automakers around the world are slashing prices for their EVs and coming out with less expensive models. The impact on their bottom line hasn't gone unnoticed.

Even Tesla (TSLA -1.11%), the leader in electric vehicles with very high brand strength, has had to slash prices. It's now planning to build a 25,000 euro vehicle (a bit less than $27,000) in Germany, according to a Reuters report. With lower prices, Tesla's profit margins have shrunk. Its cost of goods ate up 7.2% more of its sales last quarter than in the same period last year.

But its biggest rival in EV production, BYD (BYDDY 4.08%), hasn't faced the same challenge. In fact, it's managed to increase its gross margin on auto sales by three percentage points in the same period. And you can buy the stock at a great price right now.

The soon-to-be biggest EV maker

BYD delivered nearly as many EVs as Tesla last quarter: 431,000 vs 435,000. It could overtake the king of EVs in the fourth quarter.

BYD is growing its new electric vehicle, or NEV, sales extremely quickly. (The NEV categorization is used to distinguish BYD's fully electric vehicles from plug-in hybrids and internal combustion vehicles.) NEV deliveries increased 53% year over year last quarter. By comparison, Tesla deliveries increased 27%.

That strong volume growth has resulted in significant improvements in economies of scale that helped bolster gross margin. BYD saw strong sales of newer high-gross-margin models as well. Meanwhile, with its sales concentrated in China, it wasn't as impacted by the pricing wars and other pressure on pricing this past quarter. That said, BYD has made some price cuts this year in response to Tesla's price cuts in its home market.

Tesla noted the impact of rising interest rates on its pricing during its third-quarter earnings call. Since most cars in the U.S. are bought with debt, rising interest rates have a big impact on the total cost of a car. As a result, Tesla has worked to bring down its price in order to ensure it's able to meet its delivery targets.

As a result, BYD's gross margin of 22% on its vehicle sales now far exceeds Tesla's. Tesla's gross margin came in at just 17.9% last quarter.

To be sure, Tesla still generates significantly more profit per vehicle than BYD. BYD generated $1,730 in profit per vehicle sold, while Tesla generated more than twice as much, $4,260 per vehicle, in the third quarter, according to calculations published by Quartz. But the trends are favoring BYD, which is expanding its profit per vehicle, while Tesla's is contracting quickly in the current environment.

Continued strong sales growth, especially on the higher-end NEVs, and further improvement in economies of scale should push BYD's profits and margins higher still. And with the potential to expand internationally, there's plenty of room to grow NEV sales.

The stock is an absolute bargain

Despite the strong results from BYD, the stock can still be had at a great price.

Shares currently trade at around 1.1 times sales. That's well below its five-year median sales multiple of about 1.5 times.

With its expanding margins, its EV to earnings before interest, taxes, depreciation, and amortization (EBITDA) multiple has fallen to just 17 times. That's near its historic low, indicating that it's a great time to buy shares.

While pricing wars and higher interest rates have put a lot of pressure on other automakers, BYD is bucking the trend. And it doesn't look like that's going to change anytime soon. At today's price, it's worth picking up shares before it overtakes Tesla's deliveries and further closes the gap in profit per vehicle.