The Levelized Cost of Energy (LCOE) formula is commonly used to compare different energy sources or technologies by calculating the cost of generating electricity over the lifetime of the system.

To compare a solar system quote, the LCOE formula would be:

LCOE = (total cost of the system over its lifetime + maintenance costs + any other operational costs) / (total amount of electricity generated by the system over its lifetime)

The total cost of the system should include the initial installation cost of the solar panels, the cost of any necessary inverters, batteries, and other components, as well as any other associated costs such as permit fees, labor, and taxes.

Maintenance costs should also be factored into the equation, including the cost of periodic inspections, repairs, and replacement of components such as inverters and batteries.

The total amount of electricity generated by the system over its lifetime can be estimated based on the system's capacity and expected annual energy production.

By dividing the total cost of the system by the total amount of electricity generated, the LCOE provides a standard metric for comparing the cost of solar energy with other energy sources, such as coal or natural gas.

Using fewer inputs to simply the calculation, the formula for calculating the LCOE with the following inputs (1. Capital Costs 2. Maintenance Costs 3. Annual Energy Production 4. Performance Degradation 5. Lifetime 6. Inflation rate) would look like the following;

LCOE = (Capital Costs + Present Value of Maintenance Costs) / (Total Present Value of Electricity Generated)

Where:

Capital Costs = the total cost of the solar system, including installation and equipment costs. Maintenance Costs = the total cost of maintenance and repairs over the lifetime of the system. Present Value of Maintenance Costs = the total maintenance costs, adjusted for inflation and discounted to their present value. Annual Energy Production = the amount of electricity the system generates in a year. Performance Degradation = the rate at which the system's energy output declines each year due to wear and tear. Lifetime = the expected lifetime of the solar system. Inflation Rate = the rate at which the cost of maintenance and repairs will increase over time.

Total Present Value of Electricity Generated = the sum of the present value of the system's annual electricity production over its lifetime, discounted at the same rate as the maintenance costs.

The formula can be expressed mathematically as:

LCOE = (Capital Costs + PV(Maintenance Costs)) / PV(Annuity Factor * Annual Energy Production)

Where:

PV(x) = the present value of x. Annuity Factor = the factor used to discount the annual energy production to its present value over the lifetime of the system, calculated as:

Annuity Factor = ((1 - (1 + Inflation Rate)^-Lifetime) / Inflation Rate)

And:

Annual Energy Production = (1 - Performance Degradation)^t * Annual Energy Production

Where t is the number of years since the system was installed.

Overall, this formula calculates the levelized cost of energy over the lifetime of the solar system, taking into account the initial capital costs, maintenance costs, expected annual energy production, performance degradation, lifetime, and inflation rate.

An example of an LCOE calculation that takes into account the following inputs:

Assumptions:

- Capital Costs: $100,000
- Maintenance Costs: $2,000 per year
- Annual Energy Production: 10,000 kWh
- Performance Degradation: 0.5% per year
- Lifetime: 25 years
- Inflation Rate: 2% per year

Step 1: Calculate the total cost of the system over its lifetime

- Capital Costs = $100,000
- Maintenance Costs over 25 years = $2,000 x 25 = $50,000
- Total cost of the system over its lifetime = Capital Costs + Maintenance Costs = $100,000 + $50,000 = $150,000

Step 2: Calculate the total amount of electricity generated by the system over its lifetime

- Annual Energy Production = 10,000 kWh
- Lifetime = 25 years
- Total amount of electricity generated by the system over its lifetime = Annual Energy Production x Lifetime = 10,000 kWh/year x 25 years = 250,000 kWh

Step 3: Calculate the performance degradation factor over the lifetime of the system

- Performance Degradation = 0.5% per year
- Lifetime = 25 years
- Performance degradation factor over the lifetime of the system = (1 - Performance Degradation)^Lifetime = (1 - 0.005)^25 = 0.878

Step 4: Calculate the total cost of electricity over the lifetime of the system

- Total cost of the system over its lifetime = $150,000
- Total amount of electricity generated by the system over its lifetime = 250,000 kWh
- Performance degradation factor over the lifetime of the system = 0.878
- Total cost of electricity over the lifetime of the system = Total cost of the system over its lifetime / (Total amount of electricity generated by the system over its lifetime x Performance degradation factor over the lifetime of the system) = $150,000 / (250,000 kWh x 0.878) = $0.684/kWh

Step 5: Adjust for inflation

- Inflation rate = 2% per year
- Lifetime = 25 years
- Adjusted total cost of electricity over the lifetime of the system = Total cost of electricity over the lifetime of the system x (1 + Inflation rate)^Lifetime = $0.684/kWh x (1 + 0.02)^25 = $1.08/kWh

Therefore, the LCOE for this solar system is $1.08/kWh. This number can be used to compare the cost of generating electricity from this solar system with other energy sources or technologies.