Here are Tesla's gross profit margins per quarter starting in 2014. Until the last half of 2017 when lots of money went into starting up M3 production Tesla was averaging over 20% GPM per quarter. That would mean that they were making something over $14k on a $90k MS or MX.
Musk has said that he expects a 25% GPM on the M3 once production problems are ironed out. That would be $10k on a $40k car. There are sales and administration costs on top of the cost of manufacturing which is used to calculate the GPM but as production levels rise the amount per car drops.
Once things are running smoothly I suspect Tesla could drop the starting price of the M3 to under $30k and start eating the Camry/Accord market.
Dec. 31, 2017 13.34%
Sept. 30, 2017 15.05%
June 30, 2017 23.90%
March 31, 2017 24.77%
Dec. 31, 2016 19.05%
Sept. 30, 2016 27.70%
June 30, 2016 21.64%
March 31, 2016 22.01%
Dec. 31, 2015 18.00%
Sept. 30, 2015 24.71%
June 30, 2015 22.34%
March 31, 2015 27.67%
Dec. 31, 2014 27.36%
Sept. 30, 2014 29.57%
June 30, 2014 27.69%
March 31, 2014 25.00%