Skip to main content
Glama

Proven Plaza Calculators & Open Data

EV Charging Cost Calculator (Cost per Mile, Month and Full Charge by State)

calc_ev_charging_cost
Read-only

What it costs to charge an electric car at home: cost per mile, per month and per full charge from your car's kWh per 100 miles and your state's average residential electricity price (EIA, August 2026) or your own rate, with an optional gas comparison. Formula: Cost per mile = kWh/100 mi ÷ 100 × $/kWh ÷ (1 − loss%). Month = cost per mile × miles. Full charge = battery kWh × $/kWh ÷ (1 − loss%). Gas cost per mile = $/gal ÷ mpg.

Input Schema

NameRequiredDescriptionDefault
stateNoState (EIA average residential rate); default US
gas_mpgNoGas car mpg (optional) (mpg); default 0
gas_priceNoGas price to compare (optional) ($/gal); default 0
battery_kwhNoBattery size (optional, for full-charge cost) (kWh); default 0
rate_per_kwhNoYour rate (optional; overrides the state) ($/kWh); default 0
kwh_per_100miNoEfficiency (EPA label) (kWh/100 mi); default 30
miles_per_monthNoMiles per month (mi); default 1000
charging_loss_pctNoCharging loss allowance (optional) (%); default 0

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish this is a safe, closed-world read (readOnlyHint=true, openWorldHint=false), so the bar is lower. The description still adds substantive context: the data source and vintage (EIA, August 2026), that a user-supplied rate overrides the state default, and the exact formulas including the charging-loss divisor. It does not say what happens to the full-charge and gas outputs when their optional inputs default to 0.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Outputs are front-loaded in the first clause, followed by inputs and then the formulas, so the agent gets the gist immediately. The formula block is dense but functional rather than decorative; the only cost is that everything sits in one long run-on sentence, making the formulas harder to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, all-optional calculator with no output schema, the description supplies the calculation logic, the data source, and the sentinel default behavior. The notable gap is return shape — since there is no output schema, the agent is not told the result keys or how omitted optional outputs (gas, full charge) are represented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description earns above baseline by showing how each parameter actually enters the calculation (efficiency divided by 100 and multiplied by $/kWh, month = per-mile × miles, loss% applied as a divisor). This makes the override relationship between rate_per_kwh and state, and the role of charging_loss_pct, concrete rather than merely labeled.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific subject (home EV charging cost) and enumerates the exact outputs: cost per mile, per month, per full charge, plus optional gas comparison. The inputs it consumes (kWh/100 mi, state electricity rate, own rate) are named, so an agent can tell this apart from sibling energy calculators like calc_appliance_energy_cost without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clear — 'charging an electric car at home' — and the description signals which inputs trigger the optional branches (gas comparison needs mpg and $/gal; full-charge cost needs battery kWh). It does not name an alternative tool or state when not to use it, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources