Created
April 30, 2026 15:53
-
-
Save cpswan/6f995f8e0f30fe7ada3ceda95e5f7f38 to your computer and use it in GitHub Desktop.
Script to calculate payback time for an iBoost device
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/env python3 | |
| # Script generated by Gemini | |
| # https://gemini.google.com/share/b46c488b3399 | |
| def calculate_iboost_payback(): | |
| print("--- Solar iBoost Payback Calculator ---") | |
| # User Inputs | |
| cost_of_iboost = float(input("Cost of iBoost + Installation (£): ")) | |
| gas_price_per_kwh = float(input("Cost of gas per kWh (£): ")) | |
| export_price_per_kwh = float(input("Export tariff (SEG) per kWh (£): ")) | |
| boiler_efficiency = float(input("Boiler efficiency (e.g., 0.85 for 85%): ")) | |
| # Estimates for energy diversion | |
| diverted_energy_per_year = float(input("Estimated kWh diverted to hot water per year: ")) | |
| # Calculation logic: | |
| # 1. The 'Effective Cost' of the gas you're replacing. | |
| # Since boilers aren't 100% efficient, you save more than 1kWh of gas for every 1kWh of immersion heat. | |
| effective_gas_saving = gas_price_per_kwh / boiler_efficiency | |
| # 2. The 'Net Saving' per kWh. | |
| # You save the gas cost but LOSE the export payment you would have received. | |
| net_saving_per_kwh = effective_gas_saving - export_price_per_kwh | |
| if net_saving_per_kwh <= 0: | |
| print("\nResult: Based on these figures, the iBoost will never pay for itself.") | |
| print("Your export tariff is more valuable than the gas you are saving.") | |
| return | |
| # 3. Annual and Payback calculations | |
| annual_savings = diverted_energy_per_year * net_saving_per_kwh | |
| payback_years = cost_of_iboost / annual_savings | |
| print(f"\n--- Results ---") | |
| print(f"Net saving per kWh: £{net_saving_per_kwh:.4f}") | |
| print(f"Total annual savings: £{annual_savings:.2f}") | |
| print(f"Payback period: {payback_years:.2f} years") | |
| if __name__ == "__main__": | |
| calculate_iboost_payback() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment