Ramesh Inampudi

Web apps

iReV: An EV Charging Calculator in One HTML File

By Ramesh Inampudi · 2026-11-19 · 4 min read

Charging an electric car in India is harder to estimate than filling a petrol tank. Chargers range from a 3-pin wall socket to DC fast units, each network prices energy differently, and GST of 18% changes the final bill. I wanted a quick answer to simple questions: how long will this take, what will it cost, and where is the nearest station? So I built iReV, which I call Charge Matrix, a calculator and station finder for Indian EV owners.

Why I built it

The vehicle I had in mind first was the Mahindra XEV 9e Cineluxe. A typical question for a new owner is: how long and how much to charge from 20% to 80% at a mall charger? Answering that by hand means knowing the battery size, the charger's power, the operator's rate and the tax. Most people do not want to do that arithmetic in a parking lot.

The other gap was discovery. Charging networks each have their own app, and it is not obvious which one you need to pay at a given station. I wanted one place that handled the maths, the map and the app links.

What it does

The app has three tabs.

Calculator

Live Stations

This tab detects your location and lists nearby stations with distance, pricing, plug availability and one-tap navigation. You can switch between a list and a map, pick a search radius, and filter by chips such as Malls, DC, AC, CCS2, Type 2, 50kW+ and Available. Station data comes from the OpenChargeMap API. If the network is unavailable, the app falls back to 14 curated Hyderabad stations.

Charging Apps

A grid of 14 charging network apps with Android and iOS store links, so a new user can see which app to install for a given operator.

How it works

The whole product is one index.html file containing the HTML, CSS and JavaScript. There is no build step and no server. It is hosted on GitHub Pages, and the only external dependencies are Leaflet.js 1.9.4 for the map, using OpenStreetMap tiles, and the OpenChargeMap v3 API for live station data.

Inside the script, the data lives in plain arrays and objects:

Around that sit roughly 30 JavaScript functions that handle the selectors, rendering, calculation and station fetching.

Choices worth reusing

Real-world efficiency, not the brochure number. When you pick a variant, the app fills the km/kWh field with the variant's WLTP efficiency multiplied by 0.70, capped at 8.5. WLTP figures are lab results, so a 70% factor gives a more honest range estimate, and because the field stays editable you can correct it with your own experience.

Cascading dropdowns from one data structure. Changing the make repopulates the models and resets to the first one. Changing the model does the same for variants. Changing the variant sets the battery size, efficiency, header badge and results in one pass. Keeping the reset rules simple avoids stale combinations.

Graceful fallback. A live API is a dependency you do not control. Shipping a small curated list means the Stations tab still shows something useful when the request fails, and a status bar tells the user whether data is live, cached or loading.

Navigation by name. Station links open Google Maps with a name-based search rather than raw coordinates, which I found gives more accurate results for pointing someone to the right place.

No build toolchain. For a tool this size, a single file removes deployment friction entirely: push to the main branch and it is live. The trade-off is that data and code share a file, which gets harder to maintain as the vehicle list grows.

What I learned

Try it

You can use the app here: https://irev-ir.vercel.app. Pick your vehicle, set your SOC range, choose a charger and see the time, cost and range. Then open the Live Stations tab to find a charger nearby.

Conclusion

iReV is a small project with a narrow goal: take the guesswork out of EV charging in India. It runs as a single HTML file with Leaflet and OpenChargeMap as its only dependencies, and that simplicity is the main design decision I would carry into similar tools. If you have a correction to the data or a feature idea, write to me at hello@iramesh.com.

Live: https://irev-ir.vercel.app