u/AppropriateShine9679

I spent the last two months building a static home energy audit tool and wanted to share some of the technical decisions I made along the way.

The core calculation problem

Most energy calculators I found use a single national average. I wanted state level accuracy, so I sourced residential electricity rates for all 50 states from EIA data updated February 2026, and used EPA eGRID emission factors to convert kWh to CO2 pounds per kilowatt hour.

The calculator runs entirely client side with no backend. Audit answers are stored in localStorage and processed through a 13 step calculation engine in vanilla JavaScript. Each step applies a multiplier or addition based on real data sources.

The multiplier approach

Base energy starts at 899 kWh per month from EIA RECS 2020 average household data. Then I apply occupancy, home age, and insulation multipliers before adding heating, cooling, and appliance contributions. Every hardcoded value has a source comment in the code.

What I got wrong

A professional from a heat pump installation company pointed out that my calculator doesn't distinguish between gas and electric appliance carbon profiles separately. A gas dryer and electric dryer have very different emissions. I'm working on fixing this.

The methodology is public

Everything is documented in a methodology.md file in the repo including sources, assumptions, and the reasoning behind each data point.

Full repo: github.com/arav-patel/PowerSense

reddit.com
u/AppropriateShine9679 — 22 days ago