Tesla Motors Inc (NASDAQ:TSLA) and SolarCity Corp (NASDAQ:SCTY) recently entered into an acquisition deal worth $2.6 billion. Lazard, an investment bank, did some analysis to find out the value and advised SolarCity accordingly, but later it was found that there was an error in the analysis, due to which the value of the solar energy company was discounted by $400 million. Tesla revealed this in a regulatory filing on Wednesday.

Tesla Motors, SolarCity

Purchase price miscalculated

Lazard indicated an equity value of between $14.75 and $34.00 per share for SolarCity, but it was wrong because some of the company’s projected indebtedness was counted twice, as per the filing Tesla made with the U.S. Securities and Exchange Commission (SEC).

The computational error was identified on August 18 — more than two weeks after the signing of the deal. Lazard, which use a discounted cash flow model to calculate the valuation range, later realized that it was $18.75 to $37.75 per share. Even after accounting for the miscalculation, the purchase price that Lazard came up with for SolarCity was within the valuation range. But this incident serves as a good example of how even leading investment banks can make mistakes on some of the most high-profile deals.

As per the filing, the two companies have agreed that there won’t be any change in their view of the deal due to the error. The purchase, to be paid for with Tesla stock, remains $25.37 per share.

Tesla wasn’t initially interested in buying SolarCity

Tesla held a special board meeting on February 29, when its CFO made a presentation outlining the potential synergies the company could achieve by merging with SolarCity. The board did not like the idea very much at that time and decided not to proceed with the evaluation of a potential strategic acquisition, the SEC filing revealed.

Tesla’s board was concerned that the legwork for the merger would put an additional burden on Tesla management’s time and resources. This was especially due to the fact that the company was struggling to keep up with its production goals for the Model X and was running behind schedule.

Musk raised the issue once again on May 31 (three months later) with the board, and at that time, the board agreed to vet the possibility of acquiring a solar energy company— whether SolarCity or a different target, according to the filing.

On Wednesday, Tesla shares closed up 0.32% at $212.01. Year to date, the stock is down almost 11%, while in the last year, it is down almost 15%.