Convert mAh / Ah / Wh / kWh / J
API · /battery-api
Battery Calculator API
Battery and accumulator maths as an API, computed locally and deterministically from basic electrical relationships. The runtime endpoint estimates how long a battery will last under a given load — from the capacity (in mAh, Ah or Wh) and the load (in watts, or amps at a voltage), with adjustable depth-of-discharge and conversion efficiency — and reports the usable energy and the runtime in hours and minutes. The capacity endpoint converts a battery capacity between milliamp-hours, amp-hours, watt-hours, kilowatt-hours and joules at a given voltage. The pack endpoint builds a series/parallel cell pack (for example 3S2P): it returns the pack voltage, capacity and energy and the total cell count — series adds voltage, parallel adds capacity. The charge endpoint estimates the charge time from the capacity and the charge current (or a C-rate), with a charge efficiency and an optional from/to state-of-charge window. Everything is computed locally and deterministically, so it is instant and private. Real-world figures depend on temperature, age, C-rate and the discharge curve, so treat the results as estimates. Ideal for consumer-electronics and IoT tools, solar and off-grid sizing, drone and RC planning, UPS and backup-power sizing, and EV and battery-pack design. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is battery maths; for Ohm's-law voltage/current/resistance use an electronics API.
API health
healthy- Uptime
- 100.00%
- Server probes · 24h
- Avg latency
- 74 ms
- Server probes · 24h
- Subscribers
- 4,005
- active
- Total calls
- 100
- last 7 days
Pricing
Pick a tier — billed monthly, cancel anytime.
Free
Free
- 9,535 calls / month
- 2 requests / second
- Hard cap (429 above quota, no overage)
- 9,535 calls/month
- 2 req/sec
- Runtime + capacity + pack + charge
- No credit card
Starter
€11.05 /month
- 19,150 calls / month
- 8 requests / second
- Hard cap (429 above quota, no overage)
- 19.15k calls/month
- 8 req/sec
- mAh / Wh / J conversions
- Email support
Pro
€30.95 /month
- 241,500 calls / month
- 20 requests / second
- Hard cap (429 above quota, no overage)
- 241.5k calls/month
- 20 req/sec
- Solar / pack-design pipelines
- Priority support
Mega
€68.95 /month
- 1,250,000 calls / month
- 50 requests / second
- Hard cap (429 above quota, no overage)
- 1.25M calls/month
- 50 req/sec
- Platform scale
- Dedicated SLA
Built by
Related APIs
Other APIs with overlapping tags.
Off-Grid Solar Sizing API
Off-grid solar system-sizing maths as an API, computed locally and deterministically — the battery-bank, solar-array and charge-controller numbers an RV, cabin, boat or off-grid homeowner sizes a system with. The battery-bank endpoint gives the storage you need = (daily load × days of autonomy) ÷ (depth of discharge × round-trip efficiency), then ÷ the system voltage for amp-hours: the autonomy carries you through cloudy days and the depth-of-discharge limit protects the cells (lead-acid ~50 %, lithium 80–100 %, which is why lithium banks run smaller), so a 2 kWh/day load at 12 V with 2 days autonomy, 50 % DoD and 85 % efficiency needs about 785 Ah. The array endpoint gives the panels = daily energy ÷ (peak sun hours × system efficiency), where peak sun hours is the day's irradiance as equivalent full-sun hours (~3–6 by place and season) and the efficiency rolls up controller, wiring, heat and dust losses — about 670 W for that load at 4 sun hours and 75 %. The charge-controller endpoint sizes the controller = array watts ÷ battery voltage × a 1.25 safety factor, so a 700 W array on a 12 V bank wants roughly an 80 A controller. Everything is computed locally and deterministically, so it is instant and private. Ideal for solar-installer and DIY tools, RV/marine/cabin power planners, and renewable-energy calculators. Pure local computation — no key, no third-party service, instant. Size for the worst month. 3 compute endpoints. For solar irradiance and sun hours use a solar API; for battery runtime under load a battery API.
api.oanor.com/offgrid-api
Battery Pack API
Battery-pack design maths as an API, computed locally and deterministically — the voltage, capacity, energy, current and charge-time numbers an EV, e-bike, solar or robotics pack builder lays out a battery with. The configuration endpoint turns a series-parallel cell layout into the pack: cells in series add their voltages (the series count sets the pack voltage) and cells in parallel add their amp-hours (the parallel count sets the capacity), with the energy in watt-hours = voltage × capacity — a 13S4P pack of 3.6 V / 3.5 Ah cells is 46.8 V, 14 Ah and about 655 Wh from 52 cells, and it also reports the full-charge voltage (series × 4.2 V for Li-ion) to size the charger and BMS. The c-rate endpoint relates current to capacity both ways — give a C-rate to get the current, or a current to get the C-rate — because 1C draws or charges the whole capacity in an hour, so a 14 Ah pack at 2C is 28 A, and it returns the power if you pass the pack voltage. The charge-time endpoint gives the time to charge between two states of charge from the charge current. Everything is computed locally and deterministically, so it is instant and private. Ideal for EV and e-bike builders, solar and off-grid storage tools, robotics and drone packs, and battery-engineering apps. Pure local computation — no key, no third-party service, instant. Pack-design estimates — real cells taper on charge and sag under load. 3 compute endpoints. For runtime under a load use a battery API; for EV charging an EV-charging API.
api.oanor.com/batterypack-api
Stadiums API
Stadiums and sports venues around the world as an API — 7,000+ stadiums from Wikidata with their seating capacity, country and city, geographic coordinates and year opened. Search and filter by name, country, minimum capacity and opening year (the results come back largest-first, so it doubles as a "biggest stadiums in the world" ranking), or find every stadium near any coordinate by great-circle distance. Ideal for sports, travel, ticketing, maps, trivia and matchday apps. Open data from Wikidata.
api.oanor.com/stadiums-api
Solar Row Spacing API
Solar-array row-spacing and shading geometry as an API, computed locally and deterministically — the shadow-length, inter-row-spacing and ground-coverage numbers a PV designer or installer lays a ground-mount or flat-roof array out with. The shadow-length endpoint gives the shadow an object casts = its height ÷ tan(sun elevation), longer the lower the sun (which is why layouts are designed for the worst-case winter-solstice low sun), stretched by 1/cos(azimuth difference) when the sun is off-axis. The row-spacing endpoint gives the minimum row pitch (front edge to front edge) to stop a row shading the one behind = the module's horizontal base (length × cos tilt) + the shadow its back edge casts (module height ÷ tan of the minimum sun elevation) — a 1.7 m module at 30° tilt clearing a 20° winter sun needs about a 3.8 m pitch — and returns the resulting ground coverage ratio. The ground-coverage endpoint gives that GCR = module length ÷ row pitch, the packing density: fixed-tilt fields typically run 0.4–0.5, higher packs more kW per acre but loses winter yield to mutual shading, lower wastes land. Everything is computed locally and deterministically, so it is instant and private. Ideal for solar-design and layout tools, EPC and site-assessment apps, and renewable-energy calculators. Pure local computation — no key, no third-party service, instant. Geometric model — use the real worst-hour sun altitude. 3 compute endpoints. For solar position/altitude use a solar-position API; for irradiance a solar API; for off-grid sizing an off-grid API.
api.oanor.com/pvspacing-api
Frequently asked questions
Quick answers about pricing, quotas, and integration.
How do I get an API key for Battery Calculator API?
What's the rate limit for Battery Calculator API?
How much does Battery Calculator API cost?
Can I cancel my subscription anytime?
Is Battery Calculator API GDPR-compliant?
Pick an endpoint from the list on the left to see its details and try it.
Code snippets
Sign up to get an API key, then call any path under your slug.
curl https://api.oanor.com/battery-api/SOME_PATH \
-H "x-oanor-key: oanor_test_..."
const res = await fetch("https://api.oanor.com/battery-api/SOME_PATH", {
headers: { "x-oanor-key": "oanor_test_..." }
});
const data = await res.json();
$ch = curl_init("https://api.oanor.com/battery-api/SOME_PATH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
$response = curl_exec($ch);
import requests
r = requests.get(
"https://api.oanor.com/battery-api/SOME_PATH",
headers={"x-oanor-key": "oanor_test_..."},
)
print(r.json())
Ratings
Sign in to rate.
No reviews yet.
Discussion
Ask questions, share usage tips, get answers from the provider and other developers. Public — anyone can read.
Sign in to start a thread or reply.
Sign inNew thread
·
-
Provider answer
🔒 This thread is locked — no new replies.
-
·
- No threads yet — start the discussion.
Support
Private 1:1 support with the provider — billing questions, integration issues, account problems. Only you and the provider team can see these threads.
Sign in to open a support ticket.
Sign inOpen new ticket
Describe what you need help with. The provider team gets an email and replies on the ticket page.
-
·
Urgent - No tickets yet for this API.