**European Economic Area (EEA) developers**

> [!NOTE]
> If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google
> Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. [Learn more](https://developers.google.com/maps/comms/eea/faq.md.txt). In addition, certain content from the Solar API will no longer be returned. [Learn more](https://developers.google.com/maps/comms/eea/solar.md.txt).

This section describes how to do the calculations that enable you to determine
the best solar configuration for households in non-US locations. To calculate
the recommendations, you need to model the costs of installing solar panels and
the savings that they provide by using the data from a Solar API
response.

For US locations, the Solar API returns an instance of the
[FinancialAnalysis](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#FinancialAnalysis) object for each electric bill size for the input location.
You use the information in these instances to determine the bill, energy
consumption, and, ultimately, the savings that are associated with each solar
installation size.

For non-US locations, the API response doesn't include the [FinancialAnalysis](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#FinancialAnalysis)
instances, so you have to calculate the cost and savings for each solar
configuration yourself before you can recommend the best one. To perform the
calculations, you need to gather location-specific data and follow the guidance
in this document.

You can model your calculations on the calculations that the Solar API
uses for US locations. For an explanation of these calculations, see [Calculate
cost savings (US)](https://developers.google.com/maps/documentation/solar/calculate-costs-us).

## Solar panel configurations

For non-US locations, the information about each solar panel configuration that
you need for financial analysis is provided in the [`SolarPanelConfig`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#solarpanelconfig) field.
The number of `SolarPanelConfig` instances that are returned depends on the roof
size of the input location. For your calculations, you need the values from the
following two fields:

- [`panelsCount`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#SolarPanelConfig.FIELDS.panels_count): The number of panels that are used in this configuration.
- [`yearlyEnergyDcKwh`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#SolarPanelConfig.FIELDS.yearly_energy_dc_kwh): The amount of solar energy, in kWh of DC electricity, that this configuration produces over the course of a year, given the panel size defined by the following fields in the [`SolarPotential`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#solarpotential) object:
  - [`panelHeightMeters`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#SolarPotential.FIELDS.panel_height_meters): The panel height in meters.
  - [`panelWidthMeters`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#SolarPotential.FIELDS.panel_width_meters): The panel width in meters.
  - [`panelCapacityWatts`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#SolarPotential.FIELDS.panel_capacity_watts): The panel power rating in watts.

The following example shows one instance of the `SolarPanelConfig` object in the
`solarPanelConfigs` field in a request response:

```
  "solarPanelConfigs": [
      {
        "panelsCount": 4,
        "yearlyEnergyDcKwh": 1709.2424,
        "roofSegmentSummaries": [
          {
            "pitchDegrees": 16.253168,
            "azimuthDegrees": 169.41516,
            "panelsCount": 4,
            "yearlyEnergyDcKwh": 1709.2424
          }
        ]
      }
  ]
```

For solar installations, `installationSize` refers to the kW output rather than
the area or panel count and is defined as:

```
installationSize = panelsCount * panelCapacityWatts/1000 kW
```

## Adjust energy production estimates for different panel ratings

To calculate the `yearlyEnergyDcKwh` value, the Solar API uses the power
rating in the [`panelCapacityWatts`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#SolarPotential.FIELDS.panel_capacity_watts) field, which is currently 400W.

If you need to use a different panel power rating in your calculations and the
dimensions of the panels are roughly comparable to the values in the
`panelHeightMeters` and `panelWidthMeters` fields, you can adjust your
calculations by multiplying the value returned by the API in the
`yearlyEnergyDcKwh` field by the ratio of your power rating to the value in
`panelCapacityWatts`.

For example, if the power rating of your panels is 500W and `panelCapacityWatts`
is 400W, multiply the value of `yearlyEnergyDcKwh`, which the API calculated by
using `panelCapacityWatts`, by a factor of 500/400, or 1.25. If your panel power
rating is 200W, multiply `yearlyEnergyDcKwh` by 200/400, or 0.5.

## Excess energy production

Accounting for excess energy that might be produced by a solar installation is
out of scope for the Solar API calculations. In fact, if the
Solar API returns multiple possible `SolarPanelConfig` instances for a
given household, the Solar API doesn't consider results or configurations
that produce more power than the assumed US average household consumption in the
`FinancialAnalysis`.

However, you might have reasons for including installations that produce excess
electricity in your recommendations. For example, you might want to offset the
gradual decline in panel efficiency (the *efficiencyDepreciationFactor* ) by
allowing for excess production in the first part of an installation's life. For
more information, see [Required values for financial
analysis](https://developers.google.com/maps/documentation/solar/calculate-costs-non-us#required-values).

Whatever your reasons, if you do include solar installations that produce excess
electricity in your calculations, just be aware that the calculations that are
explained here don't cover that scenario.

## Required values for financial analysis for non-US locations

From each [`SolarPanelConfig`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#solarpanelconfig) instance in the API response, you need two values
to perform the financial analysis for that instance:

- **`panelsCount`:** The number of solar panels in an installation. You use this value in your calculation of the `installationSize`.
- **`yearlyEnergyDcKwh`:** How much solar energy a layout captures over the course of a year, in kWh of DC electricity, given a specific `panelsCount`. You use this value in your calculation of the solar energy that is usable as AC electricity in a household (`initialAcKwhPerYear`) of each `installationSize`, taking into account any energy loss during the conversion from DC to AC.

Additionally, you need to gather location-specific values for the following
variables that you will use in the calculations:

- ***billCostModel()*:** Your model for determining the cost, in local currency, paid by a household for using a given number of kWh. How much a utility charges for electricity can vary from day to day or hour to hour depending on things like demand, time of day, and how much electricity the household consumes. You might need to estimate an average cost.
- ***costIncreaseFactor*:** The factor by which the cost of electricity increases annually. The Solar API uses 1.022 (2.2% annual increase) for US locations. Adjust this value as needed for your area.
- ***dcToAcDerate*:** The efficiency at which an inverter converts the DC electricity that is produced by the solar panels to the AC electricity that is used in a household. The Solar API uses 85% for US locations. Adjust this value as needed for your area.
- ***discountRate*:** The Solar API uses 1.04 (4% annual increase) for US locations. Adjust this value as needed for your area.
- ***efficiencyDepreciationFactor*:** How much the efficiency of the solar panels declines each year. The Solar API uses 0.995 (0.5% annual decrease) for US locations. Adjust this value as needed for your area.
- ***incentives*:** Include any monetary incentives to install solar panels given by government entities in your area.
- ***installationCostModel()*:** Your method for estimating the cost of installing solar in local currency for a given `installationSize`. The cost model would typically account for local labor and material costs for a given `installationSize`.
- ***installationLifeSpan*:** The expected lifespan of the solar installation. The Solar API uses 20 years. Adjust this value as needed for your area.
- ***kWhConsumptionModel()*:** Your model for determining how much energy a household consumes based on a monthly bill. In its simplest form, you would divide the bill by the average cost of a kWh in the household's location.
- ***monthlyBill*:** the average monthly electric bill for a subject household.
- ***monthlyKWhEnergyConsumption*:** An estimate of the average amount of electricity the household at a given location consumes in a month, measured in KWh.

With these values and the information provided by the API response, you can
perform the calculations necessary to recommend the best `installationSize` for
locations not covered by the Solar API.

## Calculation steps

The following steps are based on the Solar API's methodology. You might
need to adjust your methodology based on the information that is available for
your location.

1. **Calculate the annual energy consumption of the household at the input
   location:**

   1. Estimate or request the monthly bill for the household.
   2. Calculate the *monthlyKWhEnergyConsumption* from the monthly bill. (If you know the *monthlyKWhEnergyConsumption*, you can skip this step.) For example:

   > *monthlyKWhEnergyConsumption* = *kWhConsumptionModel* (*monthlyBill*)
   1. Calculate *annualKWhEnergyConsumption* by multiplying *monthlyKWhEnergyConsumption* by 12:

   > *annualKWhEnergyConsumption* = *monthlyKWhEnergyConsumption* x 12
2. **Get the API response for the target household:**

   ```html
   https://solar.googleapis.com/v1/buildingInsights:findClosest?location.latitude=lat-number&location.longitude=long-number&key=yourAPIKey
   ```

   The response includes usable sunlight, usable roof space, and one or more
   possible solar panel configurations.
3. **Calculate the annual solar energy AC production** of each
   `installationSize` the API proposes by multiplying the `yearlyEnergyDcKwh`
   value provided by the API in each `SolarPanelConfig` instance by your local
   *dcToAcDerate*:

   > *initialAcKwhPerYear* = `yearlyEnergyDcKwh` x *dcToAcDerate*
4. **Optionally, remove from consideration any `SolarPanelConfig` instance that
   produces more electricity than the household consumes annually**
   (*initialAcKwhPerYear* \> *annualKWhEnergyConsumption*).

5. **Calculate the lifetime solar energy production**
   (*LifetimeProductionAcKwh* ) of each returned *installationSize*:

   1. For each year of the lifespan of the solar installation, **calculate the
      amount of electricity the installation will produce annually** , applying the *efficiencyDepreciationFactor* exponentially to each year after the first.
   2. Add the totals for all years.

   The following table shows an example of how to calculate the lifetime energy
   production assuming an *installationLifeSpan* of 20 years. Each row
   represents a year of production. After the first year, the efficiency
   decline is applied exponentially. Finally, the sum of all rows is the
   lifetime energy production of the solar installation.

   | Year | Yearly solar energy production (kWh) |
   |---|---|
   | 1 | *initialAcKwhPerYear* |
   | 2 | + *initialAcKwhPerYear* x *efficiencyDepreciationFactor* |
   | : | : |
   | 20 | + *initialAcKwhPerYear* x *efficiencyDepreciationFactor*^19^ |

Because the solar panel efficiency decays at a constant rate, it is essentially
a geometric series where *a* = initialAcKwhPerYear and *r* =
efficiencyDepreciationFactor. We can use a geometric sum to calculate the
`LifetimeProductionAcKwh`:

```
LifetimeProductionAcKwh = (dcToAcDerate * initialAcKwhPerYear * (1 - pow(efficiencyDepreciationFactor, installationLifeSpan)) / (1 - efficiencyDepreciationFactor))
```

The following Python code computes the geometric sum above:

```python
def LifetimeProductionAcKwh(
    dcToAcDerate,
    yearlyEnergyDcKwh,
    efficiencyDepreciationFactor,
    installationLifeSpan):
  return (
    dcToAcDerate *
    yearlyEnergyDcKwh *
    (1 - pow(
      efficiencyDepreciationFactor,
      installationLifeSpan)) /
    (1 - efficiencyDepreciationFactor))
```

1. **For each returned `installationSize`, calculate the lifetime cost of
   energy consumption if the `installationSize` is installed**:

   1. For each year of the lifespan of the solar installation, **calculate the
      cost of the electricity the household will need to purchase annually to
      cover the energy consumption not met by solar power** . Use the values for *annualKWhEnergyConsumption* and *initialAcKwhPerYear* that you calculated previously. For each year after the first year, apply the *efficiencyDepreciationFactor* , *costIncreaseFactor* , and the *discountRate* to the values.
   2. Add the totals for all years.

   The following table shows an example of how to calculate the lifetime cost
   of electricity. Each row represents the cost of electricity for a year
   in the life of the solar installation. After the first year, both the
   increased cost of electricity and the discount rate are applied
   exponentially. Finally, the sum of all rows is the lifetime cost of
   electricity with the solar installation.

   | Year | Annual utility bill in current local currency value (USD) (*annualUtilityBillEstimate*) |
   |---|---|
   | 1 | *annualUtilityBillEstimateYear1* = *billCostModel* (*yearlyKWhEnergyConsumption* - *initialAcKwhPerYear*) |
   | 2 | *annualUtilityBillEstimateYear2* = *billCostModel* (*yearlyKWhEnergyConsumption* - *initialAcKwhPerYear* x *efficiencyDepreciationFactor*) x *costIncreaseFactor* / *discountRate* |
   | : | : |
   | 20 | *annualUtilityBillEstimateYear20* = *billCostModel* (*yearlyKWhEnergyConsumption* - *initialAcKwhPerYear* x *efficiencyDepreciationFactor19*) x *costIncreaseFactor19* / *discountRate19* |

The following Python code returns an array of `annualUtilityBillEstimate` for
every year of the `installationLifeSpan`:

```
def annualUtilityBillEstimate(
    yearlyKWhEnergyConsumption,
    initialAcKwhPerYear,
    efficiencyDepreciationFactor,
    year,
    costIncreaseFactor,
    discountRate):
  return (
    billCostModel(
      yearlyKWhEnergyConsumption -
      annualProduction(
        initialAcKwhPerYear,
        efficiencyDepreciationFactor,
        year)) *
    pow(costIncreaseFactor, year) /
    pow(discountRate, year))

def lifetimeUtilityBill(
    yearlyKWhEnergyConsumption,
    initialAcKwhPerYear,
    efficiencyDepreciationFactor,
    installationLifeSpan,
    costIncreaseFactor,
    discountRate):
  bill = [0] * installationLifeSpan
  for year in range(installationLifeSpan):
    bill[year] = annualUtilityBillEstimate(
      yearlyKWhEnergyConsumption,
      initialAcKwhPerYear,
      efficiencyDepreciationFactor,
      year,
      costIncreaseFactor,
      discountRate)
  return bill
```

1. **Calculate the lifetime cost of electricity if a solar installation is not
   installed**:

   1. For each year of the lifespan of the solar installation, **calculate the
      cost of the electricity the household will need to purchase annually if
      solar is not installed** . Use the value for *monthlyBill* . For each year after the first year, apply the *costIncreaseFactor* and the *discountRate* values to *monthlyBill*.
   2. Add the totals for all years.

   The following table shows an example of how to calculate the lifetime cost
   of electricity without solar. Each row represents the cost of
   electricity for a year over the same number of years as the lifespan of
   a solar installation. After the first year, both the increased cost of
   electricity and the discount rate are applied exponentially. Finally,
   the sum of all rows is the lifetime cost of electricity without solar
   installation.

   | Year | Annual utility bill in current local currency value |
   |---|---|
   | 1 | *annualBill* = *monthlyBill* x 12 |
   | 2 | *annualBill* = *monthlyBill* x 12 x *costIncreaseFactor* / *discountRate* |
   | : | : |
   | 20 | *annualBill* = *monthlyBill* x 12 x *costIncreaseFactor19* / *discountRate19* |

The following code performs the calculation above:

```
lifetimeBill = (
    monthlyBill * 12 *
    (1 - pow(costIncreaseFactor / discountRate, installationLifeSpan)) /
    (1 - costIncreaseFactor / discountRate))
```

1. **For each installation size, calculate the installation cost**:

   > *installationCost* = *localInstallationCostModel* (`installationSize`)
2. **Add up any monetary incentives** that are available to the household
   location.

3. **For each installation size, calculate the total costs** associated with
   installing solar:

   > *totalCostWithSolar* = *installationCost* + *remainingLifetimeUtilityBill*
   > - *incentives*
4. **For each installation size, calculate the total savings** associated with
   installing solar:

   > *savings* = *costOfElectricityWithoutSolar* - *totalCostWithSolar*
5. **Select the installation size that provides the most savings.**

## When your calculations are done

Using the information you provide, the information returned by the
Solar API, and the above calculations, you should be able to recommend
solar installation sizes that provide maximum cost savings for households in
your area.

In the recommendations that you provide to your end user, you can also include
the following information that is returned by the API in the [`SolarPotential`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#solarpotential)
object of the `solarPotential` field:

- How much usable sunlight a house receives annually, which is returned in the [`maxSunshineHoursPerYear`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#SolarPotential.FIELDS.max_sunshine_hours_per_year) field of the `SolarPotential` object.
- How many square feet of a roof can be used for a solar installation, which is returned in the [`wholeRoofStats`](https://developers.google.com/maps/documentation/solar/reference/rest/v1/buildingInsights/findClosest.md.txt#SolarPotential.FIELDS.whole_roof_stats) field of the `SolarPotential` object.
- The average monthly electricity bill for the household.