{"uid":"cap_Es4ZN-teFRiUg1yxYP_Rv","slug":"automotive-fuel-trip-cost-calculator-0c7ab587","name":"Automotive Fuel Trip Cost Calculator","description":"Trip fuel and cost for legs with different mileage (city, highway), tank range, refuel stops, cost per person and a second car.","url":"https://automotive-calc.x402tookit.com/fuel-trip-cost?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["legs","pricePerUnit"],"properties":{"legs":{"type":"string","description":"Lines distance:economy or name:distance:economy separated by semicolons, for example 'city:40:24; highway:260:33' (miles and mpg, or km and L/100km)"},"units":{"type":"string","description":"us (miles, mpg, gallons; default) or metric (km, L/100km, litres)"},"people":{"type":"number","description":"People sharing the cost, 1 to 20 (default 1)"},"tankSize":{"type":"number","description":"Tank size in gallons (us) or litres (metric), for range and refuel stops"},"roundTrip":{"type":"boolean","description":"true to double the legs for the return (default false)"},"altEconomy":{"type":"number","description":"A second vehicle's economy (mpg or L/100km) used for the whole trip, to compare"},"pricePerUnit":{"type":"number","description":"Fuel price per US gallon (units us) or per litre (units metric)"},"reservePercent":{"type":"number","description":"Tank share kept in reserve, 0 to 40 (default 10)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"cost":{"type":["null","number"]},"fuel":{"type":["null","number"]},"legs":{"type":["array","null"],"items":{"type":"object","properties":{"leg":{"type":["null","string"]},"cost":{"type":["null","number"]},"fuel":{"type":["null","number"]},"distance":{"type":["null","number"]}}}},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"distance":{"type":["null","number"]},"fuelUnit":{"type":["null","string"]},"roundTrip":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"usableTank":{"type":["null","number"]},"refuelStops":{"type":["null","number"]},"distanceUnit":{"type":["null","string"]},"rangePerTank":{"type":["null","number"]},"costPerPerson":{"type":["null","number"]},"averageEconomy":{"type":["null","number"]},"alternativeCost":{"type":["null","number"]},"alternativeFuel":{"type":["null","number"]},"costPerDistance":{"type":["null","number"]},"tankReservePercent":{"type":["null","number"]},"alternativeSavingsOrExtra":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dQSVtXi7659wW8Xy9jubb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates fuel consumption, total cost, cost per person, tank range, refuel stops, and optionally compares a second vehicle across multi-leg road trips with different driving modes (city/highway).","exampleAgentPrompt":"Can you calculate the fuel cost for my road trip from LA to Vegas? It's about 40 miles of city driving at 24 mpg and then 220 miles of highway at 33 mpg, gas is $4.25 a gallon, my tank holds 14 gallons, and there are 3 of us splitting the cost.","exampleUseCases":[{"title":"Family road trip fuel budget","prompt":"We're driving from Chicago to Nashville — about 30 miles of city at 22 mpg then 450 miles of highway at 35 mpg. Gas is $3.89 a gallon, tank holds 16 gallons, and there are 4 of us splitting the cost. What will we each pay in fuel, and how many times will we need to stop and fill up?"},{"title":"Compare two cars for the same trip","prompt":"I'm deciding between taking my SUV (22 mpg) or my sedan (38 mpg) on a road trip — 50 miles city at 22 mpg then 300 miles highway at 28 mpg for the SUV leg. Gas is $4.10 per gallon. Can you show me the total fuel cost for both vehicles so I can see how much I'd save with the more efficient car?"},{"title":"Metric round-trip fuel estimate","prompt":"Can you calculate the fuel cost in metric units for a round trip from Toronto to Montreal? It's 60 km of city driving at 11 L/100km and then 470 km of highway at 7.5 L/100km. Fuel costs 1.65 per litre and my tank holds 55 litres."}],"resultDescription":"Returns a breakdown of fuel consumed and cost for each named leg, total trip fuel and cost, cost per person if shared, estimated tank range, number of refuel stops needed based on tank size and reserve, a second-vehicle comparison if requested, a human-readable summary and verdict, and any warnings or degraded-mode flags.","failureModes":["Missing required 'legs' or 'pricePerUnit' parameters returns a validation error","Malformed legs string (wrong delimiter or missing fields) causes parsing failure","People count outside 1–20 range rejected","Reserve percent outside 0–40 range rejected","Inconsistent units (mixing mpg legs with metric flag) may produce incorrect results","Tank size of zero or negative value causes range/refuel calculation to fail"],"whenToPreferThis":"Choose this endpoint when you need a multi-leg fuel cost breakdown that accounts for different driving modes (city vs highway) on each segment, per-person cost splitting, tank range and refuel stop planning, or side-by-side comparison of two vehicles. It is more detailed than a simple distance-based fuel estimator and supports both US and metric units. Prefer it over generic mapping APIs when the user's primary question is about fuel economics rather than routing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:08:22.574Z","isFirstParty":false,"canonicalSlug":"automotive-fuel-trip-cost-calculator-0c7ab587"}