Fuel Cost Calculator
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Fuel Cost Calculator is a floating panel that takes the guesswork out of trip fuel budgeting. Enter your trip distance, your vehicle's fuel efficiency (in MPG or L/100km), the fuel price per unit, and optionally the number of passengers—the panel instantly calculates fuel needed, total fuel cost, cost per passenger, and cost per mile or kilometer. The panel supports both imperial (miles, gallons, MPG) and metric (kilometers, liters, L/100km) units with a simple toggle, and lets you switch between MPG and L/100km for efficiency input. You can then insert the total fuel cost or the cost per passenger directly into any editable field on the page (input, textarea, or contenteditable) with one click, or copy either value to your clipboard. Perfect for road trip planning, commute cost tracking, expense reporting, or splitting fuel costs with passengers.
WHERE IT RUNS
The panel overlays any website that loads the BotGentz extension—whether you're on a route planner, a spreadsheet, a note-taking tool, a travel blog, or any other web page. It works on all modern Chromium‑based browsers (Chrome, Edge, Brave, Arc) and Firefox. The script injects a self‑contained UI element that does not interfere with the host page's layout, styles, or JavaScript execution. It runs client‑side only, with no external API calls or cloud dependencies.
HOW TO USE
After installing the free BotGentz extension, visit any page and click the extension icon to activate the panel. The first time you use Fuel Cost Calculator, it will appear as a draggable widget near the bottom‑right corner of your viewport. To calculate fuel costs:
- Toggle "Metric units" on or off to switch between imperial (miles, gallons) and metric (kilometers, liters) systems.
- Select your efficiency unit from the dropdown: "MPG (miles per gallon)" or "L/100km".
- Enter the trip distance in the "Distance" field.
- Enter your vehicle's fuel efficiency in the "Fuel efficiency" field (the label updates to show the current unit).
- Enter the fuel price per unit (per gallon or per liter) in the "Fuel price per unit" field.
- Optionally enter the number of passengers in the "Number of passengers" field.
The panel updates all breakdown figures live—fuel needed, total fuel cost, cost per passenger, and cost per mile/km—as you type. To use a result:
- Click "Insert Total Cost into Active Field" to paste the total fuel cost into the focused editable element.
- Click "Insert Cost Per Passenger into Active Field" to paste the per-passenger cost.
- Click "Copy Total Cost to Clipboard" or "Copy Cost Per Passenger to Clipboard" to copy either value to your system clipboard.
The panel remembers your last used fuel price, unit preference, and efficiency unit across sessions.
UNIT-AWARE CONVERSION ENGINE WITH DYNAMIC LABEL PROPAGATION
Unlike simple calculators that hard-code a single unit system, this panel uses a unit-aware conversion engine that maintains separate internal representations for imperial and metric calculations while presenting a unified interface. The engine stores all input values in their native units (miles or kilometers, MPG or L/100km, dollars per gallon or per liter) and applies a unit conversion layer that recalculates fuel needs using the appropriate formula based on the active system. When the user toggles units or changes the efficiency unit dropdown, the engine does not convert existing values—instead, it preserves the raw numeric inputs and swaps the label set and calculation path. This is implemented via a state machine that tracks three independent axes: distance unit (imperial/metric), efficiency unit (MPG/L/100km), and price unit (per gallon/per liter). The engine uses a dependency graph where the efficiency unit selection determines which of two parallel calculation branches executes, and the unit toggle determines which display labels and formulas are active. All outputs are recomputed in a single topological pass, and the panel's placeholder texts, display labels, and result units update simultaneously without losing the user's entered values. This ensures that switching from MPG to L/100km preserves the numeric efficiency value while correctly interpreting it under the new unit system, avoiding the confusion of automatic conversion that often trips up users.
THE PANEL
- Drag: Click and hold the panel's header bar to move it anywhere on the screen.
- Per‑site position: The panel stores its last position separately for each domain (e.g., different positions for Google Maps vs. Excel Online) using the browser's localStorage, keyed by hostname.
- Snap: When dragged near any edge of the viewport, the panel snaps to that edge with a 16px margin for a clean, docked feel.
- Collapse: Click the "−" button in the header to collapse the panel to a compact title bar, preserving all current values. Click "+" to expand it back.
- Resize: Drag the bottom‑right corner handle to resize the panel from 280px to 600px wide and 200px to 500px tall; the layout adapts responsively.
- Escape: Press the Escape key while the panel is focused to close it entirely (you can reopen it from the extension toolbar).
PLEASE NOTE
This script requires the free BotGentz extension to run—it is not a standalone bookmarklet or user script. Websites frequently update their DOM structures and security policies; while we strive to keep the panel functional across thousands of sites, occasional updates may be needed. The calculator performs all operations entirely in your browser—no data is sent to any server, and no cookies or tracking identifiers are used. Your trip distances, fuel efficiency, prices, and passenger counts remain private to your local session and are persisted only via GM_setValue (the extension's local storage) for convenience, not shared across devices or sessions. Fuel efficiency estimates may vary based on driving conditions; we recommend consulting your vehicle's manual or real-world data for accurate calculations.