Puerto Rico remains largely without electricity after hurricane Maria ripped through the island and destroyed much of its electricity grid. With rebuilding efforts underway from both non-profits and governmental aid, the U.S. territory has been able to reactivate just over 12% of the electricity grid and expects 25% of the grid to be online in the next month. Reconstruction of transmission lines and electrical infrastructure is expected to cost upwards of $5 billion, according to Ricardo Ramos, chief executive of Puerto Rico’s Electric Power Authority. With a public utility service that’s strapped in massive debt and linked to a bankruptcy filing in July, major funding for the crucial project to rebuild remains largely unknown.

While the U.S. government has failed to help restore power on the island, Tesla CEO Elon Musk is up for the challenge. In response to a question that asked if the billionaire entrepreneur would be able to restore power to Puerto Rico using independent solar and battery systems, Musk said, “The Tesla team has done this for many smaller islands around the world, but there is no scalability limit, so it can be done for Puerto Rico too. Such a decision would be in the hands of the PR govt, PUC, any commercial stakeholders and, most importantly, the people of PR.”

This caught the eye of Puerto Rico Governor, Ricardo Rossello, who suggested that the island could become Tesla Energy’s flagship project.

With 3.4 million residents on the island that use roughly 19 billion kWh of energy per year (19 million MWh), or an average of 5,310 kWh (5.2 MWh) per capita, building a Tesla solar and battery solution to meet some of the island’s needs will easily exceed the complexity and cost of Tesla’s existing massive battery project in Australia.

The Tesla Solution

According to the U.S. Energy Information Administration, Puerto Rico consumes 19 billion kWh of electricity per year with 96.4% of it being produced by fossil fuel generators. The other 3.6% is from renewable energy sources.

For the sake of coming up with some hypotheticals, let’s assume that Puerto Rico transitions at least 40% of its power generation to solar energy. To meet that goal, Tesla would need to install a 4,164 MW solar system (factoring in available sun hours), or roughly 5.2% of total global solar deployments in 2017, which is about 320 times larger than the solar plant that Tesla built in Kauai.

While it’s difficult to calculate the exact cost of a project of this caliber, we can still make some general estimates that are based on comparable projects and standard rates. In Q3 2016 SolarCity reported that its installation costs, excluding marketing and general administrative costs, were approximately $2 per watt-hour. Based on this assumption, a solar system for Puerto Rico could cost upwards of $8.32 billion.

Tesla would also be installing batteries to help balance the solar power generation and stabilize the grid. A Tesla battery storage solution in Puerto Rico of this size would far exceed the company’s existing “world’s largest lithium-ion battery” project in South Australia. Tesla would likely need a 5,000 MWh (5,000,000 kWh) battery system to support the installed solar.

Musk had previously said that projects over 100 MWh can expect a price of $250 per kWh. For a project of this size, Puerto Rico would be buying $1.25B worth of batteries from Tesla.

To put the size of the project in perspective, it’s worth noting that Tesla’s solar division (formally SolarCity) installed nearly 900 MWh of solar in 2016 and nearly 2,400 MWh over its history. The company is also expanding both solar and battery production at Gigafactory 1 and 2, both of which will help reduce costs over time as economies of scale are realized.

The real cost…

While projects as large as a proposed Tesla solution in Puerto Rico may seem incredibly expensive at first, it’s important to look at them with the right lens. Right now, households in the region pay $.198 per kWh, over 50% higher than the US average.

The total cost of solar and batteries would be $9.58B and would supply 40% of the island’s energy for decades. With Puerto Rico’s poor credit rating and high debt, financing this project won’t come easy, nor cheap. Factoring in a presumed 7% interest rate and the total project cost would exceed $21B over 20 years. In exchange, households would see a price drop in cost per kilowatt-hour to around $.112, as Puerto Rico transitions to a cleaner energy source with a more stable grid.

This project would clearly require a substantial investment in money and labor, something Musk doubters would find too large of scale for the company to tackle. But then again, when compared to building a network of massive rockets that would transport people across the world and eventually to Mars, a large-scale battery and solar system doesn’t seem all that difficult.