---
title: "Fuel Cost Calculator"
method: POST
path: "/api/v1/tools/fuel-cost-calculator"
tags: ["tools"]
---

# Fuel Cost Calculator

`POST /api/v1/tools/fuel-cost-calculator`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/fuel-cost-calculator`
- Auth: HTTP bearer

Work out the fuel a journey burns and what it costs, from a distance in kilometres or miles, a consumption figure in any of the four common units, and a pump price per litre or gallon. Handles return trips, a repeat count for a monthly commute, and splitting the bill between passengers.

## Request body

- object
  - `distance` integer
  - `distanceUnit` string
  - `consumption` number
  - `consumptionUnit` string
  - `price` number
  - `priceUnit` string
  - `passengers` integer
  - `roundTrip` boolean
  - `trips` integer

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `totalKm` integer
    - `liters` number
    - `cost` number
    - `costPerPerson` number
    - `passengers` integer
    - `trips` integer
    - `roundTrip` boolean
    - `litersPer100Km` number
    - `pricePerLiter` number
    - `costPerTrip` number

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
