Michalskii/tankful

JavaScript

0

16 commits

updated Sep 29, 2026

See the code

See what people are saying

SourceMessageScoreDate

Fuel prices went up, so I made Google Maps tell me what a trip will cost - EU (r/SideProject)

Fuel prices in Europe have been all over the place lately, and every time I planned a longer drive I ended up doing the same thing: check the distance in Google Maps, look up fuel prices, open a calculator, then work out how much each person in the car owes. So I built something to do that for me.…

1

Sep 29, 2026

README

Tankful

The fuel cost of every driving route, right in Google Maps.
Live fuel prices for Poland and the EU, trips through several countries, electric cars and cost per person.

Add to Chrome · Online calculator · Kalkulator po polsku · Privacy

Tankful in Google Maps: fuel cost next to every route option and a trip cost panel

What it does

Tankful is a Chrome extension that adds the estimated fuel cost next to the time and distance of every driving route in Google Maps – no copying numbers into a calculator.

  • Every route option gets its cost in the route list and in the route details, and a small panel on the map compares them side by side.
  • Live fuel prices. National averages from the European Commission's Weekly Oil Bulletin for Poland and other EU countries (in Poland adjusted when Orlen wholesale prices move significantly), and the UK government's weekly road fuel prices for the UK.
  • Trips through several countries – the price is weighted by the kilometres driven in each EU country.
  • Petrol 95 and 98, diesel, premium diesel, LPG – or your own price. Electric cars get a range from charging at home to fast chargers.
  • Round trip and cost per person, e.g. "4 × PLN 51" when four people share the ride.
  • Trip history grouped by month, CSV export and the Polish mileage allowance (kilometrówka) for business trips.
  • 12 currencies converted at National Bank of Poland rates, English and Polish interface.

A trip from Warsaw to Berlin: the price is weighted between Poland and Germany

Online calculator

No Chrome, or on your phone? The same calculation works on the website: pick a start and destination, add stops, choose the fuel and the number of people, and share the result as a link.

michalskii.github.io/tankful – with ready pages for popular routes, such as Warsaw to Berlin or Kraków to Split.

The online calculator: Warsaw to Berlin with the cost split by country

Privacy

No account, no ads and no analytics in the extension. Settings and trip history stay in your browser. To pick country prices, only the start and destination of a route – rounded to about 1 km – are sent to OpenStreetMap Nominatim, and you can turn that off. Fuel prices come from a public price file on the website, built every few hours from the sources above. Details: privacy policy.

Costs are estimates based on average prices and the consumption you enter – prices at the pump vary.

Development

Plain JavaScript, Manifest V3, no build step for the extension. Node.js 22 for the tools and the website.

node tests/test.js                       # tests
node tools/pack.js                       # extension package → dist/tankful-<version>.zip
node tools/fetch-prices.js prices.json   # download current prices from the sources
node tools/build-site.js prices.json     # website → _site/ (needs Chrome for prerendering)
node tools/fetch-routes.js               # recompute popular routes (OSRM) → site/src/lib/routes.json

To try the extension from source, open chrome://extensions, turn on Developer mode, click Load unpacked and pick this folder.

PathWhat's there
manifest.json, background.jsextension manifest; service worker with price downloads and country lookup
content.js, dom.js, content.cssGoogle Maps integration: reading routes and showing costs
settings.js, borders.jssettings, price logic and currencies; EU borders for costing trips by country
popup.*, history.*, welcome.*toolbar popup, trip history, welcome page
_locales/English and Polish texts
site/the online calculator (React, Vite, Tailwind, shadcn/ui)
tools/, tests/build, packaging and price scripts; tests
docs/privacy.htmlprivacy policy

The website is deployed to GitHub Pages by .github/workflows/site.yml on every push and every 6 hours, which also refreshes prices.json.

Po polsku

Tankful to darmowa wtyczka do Chrome, która pokazuje koszt paliwa przy każdej trasie samochodowej w Mapach Google: po aktualnych średnich cenach z biuletynu Komisji Europejskiej (Polska i kraje UE) i rządu Wielkiej Brytanii, także na trasach przez kilka krajów, dla aut elektrycznych, tam i z powrotem i na osobę. Do tego historia przejazdów, eksport do CSV i kilometrówka.

Dodaj do Chrome · Kalkulator online · Popularne trasy, np. Warszawa – Kraków

License

MIT. Tankful is an independent project and is not affiliated with or endorsed by Google.

Michalskii/tankful

JavaScript

0

16 commits

updated Sep 29, 2026

See the code

See what people are saying

SourceMessageScoreDate

Fuel prices went up, so I made Google Maps tell me what a trip will cost - EU (r/SideProject)

Fuel prices in Europe have been all over the place lately, and every time I planned a longer drive I ended up doing the same thing: check the distance in Google Maps, look up fuel prices, open a calculator, then work out how much each person in the car owes. So I built something to do that for me.…

1

Sep 29, 2026

README

Tankful

The fuel cost of every driving route, right in Google Maps.
Live fuel prices for Poland and the EU, trips through several countries, electric cars and cost per person.

Add to Chrome · Online calculator · Kalkulator po polsku · Privacy

Tankful in Google Maps: fuel cost next to every route option and a trip cost panel

What it does

Tankful is a Chrome extension that adds the estimated fuel cost next to the time and distance of every driving route in Google Maps – no copying numbers into a calculator.

  • Every route option gets its cost in the route list and in the route details, and a small panel on the map compares them side by side.
  • Live fuel prices. National averages from the European Commission's Weekly Oil Bulletin for Poland and other EU countries (in Poland adjusted when Orlen wholesale prices move significantly), and the UK government's weekly road fuel prices for the UK.
  • Trips through several countries – the price is weighted by the kilometres driven in each EU country.
  • Petrol 95 and 98, diesel, premium diesel, LPG – or your own price. Electric cars get a range from charging at home to fast chargers.
  • Round trip and cost per person, e.g. "4 × PLN 51" when four people share the ride.
  • Trip history grouped by month, CSV export and the Polish mileage allowance (kilometrówka) for business trips.
  • 12 currencies converted at National Bank of Poland rates, English and Polish interface.

A trip from Warsaw to Berlin: the price is weighted between Poland and Germany

Online calculator

No Chrome, or on your phone? The same calculation works on the website: pick a start and destination, add stops, choose the fuel and the number of people, and share the result as a link.

michalskii.github.io/tankful – with ready pages for popular routes, such as Warsaw to Berlin or Kraków to Split.

The online calculator: Warsaw to Berlin with the cost split by country

Privacy

No account, no ads and no analytics in the extension. Settings and trip history stay in your browser. To pick country prices, only the start and destination of a route – rounded to about 1 km – are sent to OpenStreetMap Nominatim, and you can turn that off. Fuel prices come from a public price file on the website, built every few hours from the sources above. Details: privacy policy.

Costs are estimates based on average prices and the consumption you enter – prices at the pump vary.

Development

Plain JavaScript, Manifest V3, no build step for the extension. Node.js 22 for the tools and the website.

node tests/test.js                       # tests
node tools/pack.js                       # extension package → dist/tankful-<version>.zip
node tools/fetch-prices.js prices.json   # download current prices from the sources
node tools/build-site.js prices.json     # website → _site/ (needs Chrome for prerendering)
node tools/fetch-routes.js               # recompute popular routes (OSRM) → site/src/lib/routes.json

To try the extension from source, open chrome://extensions, turn on Developer mode, click Load unpacked and pick this folder.

PathWhat's there
manifest.json, background.jsextension manifest; service worker with price downloads and country lookup
content.js, dom.js, content.cssGoogle Maps integration: reading routes and showing costs
settings.js, borders.jssettings, price logic and currencies; EU borders for costing trips by country
popup.*, history.*, welcome.*toolbar popup, trip history, welcome page
_locales/English and Polish texts
site/the online calculator (React, Vite, Tailwind, shadcn/ui)
tools/, tests/build, packaging and price scripts; tests
docs/privacy.htmlprivacy policy

The website is deployed to GitHub Pages by .github/workflows/site.yml on every push and every 6 hours, which also refreshes prices.json.

Po polsku

Tankful to darmowa wtyczka do Chrome, która pokazuje koszt paliwa przy każdej trasie samochodowej w Mapach Google: po aktualnych średnich cenach z biuletynu Komisji Europejskiej (Polska i kraje UE) i rządu Wielkiej Brytanii, także na trasach przez kilka krajów, dla aut elektrycznych, tam i z powrotem i na osobę. Do tego historia przejazdów, eksport do CSV i kilometrówka.

Dodaj do Chrome · Kalkulator online · Popularne trasy, np. Warszawa – Kraków

License

MIT. Tankful is an independent project and is not affiliated with or endorsed by Google.

Languages

JavaScript

45.9%

TypeScript

44.8%

CSS

6.4%

HTML

2.9%