All projects

SolarGrid — rooftop solar sizing for Bengaluru

How many solar panels does a Bengaluru home need for a zero electricity bill?

An interactive calculator I designed to size the rooftop solar for a friend's house in Bengaluru. It models BESCOM net metering month by month and finds the smallest, cheapest system that brings the yearly bill to zero.

What it is
Personal project
My role
Product design and logic; built with Claude (AI-assisted)
Year
2026
Status
Live
  • React
  • Vite
  • Recharts
  • JavaScript
  • Vercel

The problem

A friend was putting rooftop solar on their house, and vendors quoted different sizes with no clear reasoning. BESCOM's rules also make the maths tricky. Exported power earns ₹2.58 a unit while imported power costs ₹6.40, so you need about 2.5 units out for every unit in.

On top of that, solar capacity is capped at your sanctioned load, which carries a fixed charge of ₹150 per kW every month. A bigger system makes more power but also raises the fixed bill, so "just oversize it" isn't free.

How I solved it

I planned how the app should work: which inputs matter, how BESCOM's rules turn into calculations, and which comparisons answer the real buying questions. I then built it with Claude as my coding assistant.

  • One settings panel at the top (tariffs, monthly load, panel size, costs, subsidy, AC usage) drives every chart and table on the page.
  • A month-by-month chart of generation vs consumption shows when the house exports a surplus and when it falls short in the monsoon.
  • A sizing table runs from 12 to 26 panels and marks the smallest array that zeroes the bill for both a realistic and a worst-case load.
  • A good-days vs bad-days table (P99 to top 20%) shows what the system makes on a heavy-monsoon day compared with a clear summer day.
  • A DCR vs non-DCR section compares cost, 25-year gain or loss, payback and ROI, including whether the ₹78,000 subsidy is worth its lower export rate.

For my friend's house the answer was 22 panels (15.4 kW) to cover even the worst-case load, and skipping the subsidy for the higher export rate came out ₹33,000 to ₹91,000 ahead over 25 years.

System design

  • Frontend only: React 19 with Vite, charts in Recharts, deployed on Vercel. No backend; every number is recalculated in the browser as the inputs change.
  • Generation model: Bengaluru's monthly solar irradiance × array size × performance ratio × days in the month, with yearly panel degradation.
  • Billing model: net bill = import cost − export credit + fixed charge, where the fixed charge follows the array size because sanctioned load has to match it.
  • 25-year comparisons add up yearly savings with degradation to get payback and ROI for each setup.

Trade-offs

  • Monthly averages instead of hourly data: simple and fast, and good enough for a yearly net-metering bill, but it can't model batteries or time-of-day tariffs.
  • Fixed charge tied to array size: keeps the answer honest (oversizing has a yearly cost), but the right size shifts if BESCOM changes its rules, so every tariff and rate is an editable input.
  • Everything in the browser: instant and free to host, but no saved scenarios or shareable links yet.
Next projectWhat happens when two patients try to book the same 10:30 slot?