ForHosting KIT · Travel & geography

Calculate parking fee by duration

Park for 5.5 hours at 4 for the first hour and 2.5 for each extra started hour, and you are billed 6 hours for 16.5, under an 18 daily cap. Check a garage estimate before you pay. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Duration hours
5.5
First hour fee
4
Additional hour rate
2.5
Daily max
18
You get
Total fee
16.5
Billed hours
6
Full days
0
Remaining hours
5.5

This parking fee calculator turns a posted rate structure and a parking duration into one predictable total. Enter the flat first-hour fee, the rate for every additional started hour, the daily maximum, and the total duration in hours. The calculator bills each started hour, caps every complete or partial 24-hour parking period independently, and shows the billed hours and cap usage behind the result. It is useful for drivers checking a garage estimate and for software teams testing parking-payment logic without relying on a clock, location service, or external pricing feed.

Translate the parking sign into four inputs

Start with the duration in hours, including a decimal when the stay includes minutes: ninety minutes is 1.5 hours, while three hours and fifteen minutes is 3.25 hours. Then copy the first-hour fee, the additional-hour rate, and the daily maximum from the garage's posted tariff. Use one currency consistently because the calculator performs arithmetic and does not convert currencies or attach a currency symbol.

A zero duration returns a zero fee. For any positive duration, the first started hour triggers the first-hour fee. Time beyond that first hour is charged at the additional rate for every started hour, so 1.01 hours occupies two billable hours.

This explicit started-hour convention avoids an ambiguous prorated answer when a tariff simply says “per hour.” All four numeric fields must be finite and non-negative. Negative fees and negative caps are rejected for the same reason: they do not describe a usable customer charge under this rate model.

Understand hourly billing and the daily maximum

The algorithm divides the stay into complete 24-hour parking periods plus one possible remainder. Within each period it first calculates the uncapped hourly charge: the first started hour uses the flat fee and every later started hour uses the additional rate. It then selects the smaller of that charge and the daily maximum.

A complete 24-hour period is therefore charged at the lesser of the daily maximum or the first-hour fee plus twenty-three additional hourly charges. A partial period follows exactly the same rule, beginning again with its own first-hour fee. For example, a 27.25-hour stay contains one complete 24-hour period and a 3.25-hour remainder.

The remainder occupies four started hours: one at the flat fee and three at the additional rate, subject to its own cap. The response reports the number of complete days, uncapped remainder hours, total billed hours, and how many periods actually exceeded the maximum. The comparison is strict: when the hourly calculation equals the maximum, the final price is the same but the cap-applied counter remains zero because the maximum did not reduce the charge.

Check a garage estimate

Compare a planned stay with the posted first-hour, additional-hour, and maximum rates before choosing a facility.

Reconcile parking expenses

Recompute a simple receipt from its duration and tariff while retaining an explanation of billed hours and capped periods.

How are partial hours billed?

Every started hour is billed. For example, 2.1 hours counts as three billed hours within its 24-hour period.

How does the daily maximum work for stays longer than one day?

The stay is split into consecutive 24-hour periods from entry, and the maximum is applied independently to each complete or partial period.

Does this calculator support grace periods or special rates?

No. It models one first-hour fee, one additional started-hour rate, and one maximum per 24-hour period.

What currency does the result use?

It uses whichever currency unit you use consistently for all three fee inputs; no currency conversion is performed.

How do I enter a stay that includes minutes?

Write the time as decimal hours: 90 minutes is 1.5 hours and three hours and fifteen minutes is 3.25. Every started hour counts, so even 1.01 hours is billed as two hours.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/travel/parking-fee-duration-calc

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/travel/parking-fee-duration-calc \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"duration_hours":5.5,"first_hour_fee":4,"additional_hour_rate":2.5,"daily_max":18}'
{
  "duration_hours": 5.5,
  "first_hour_fee": 4,
  "additional_hour_rate": 2.5,
  "daily_max": 18
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "travel.parking_fee_duration_calc",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Translate the parking sign into four inputs

In particular, a negative duration is treated as bad source data and returns an invalid_input error rather than being converted to its absolute value.

Use the result responsibly in estimates and software

Here, a “day” is always a consecutive 24-hour parking period measured from entry, which keeps the calculation deterministic. Confirm that this matches the facility's posted terms before treating the result as an invoice. Store the original tariff beside the response when prices may change, and add separate business rules upstream if a facility prorates partial hours or resets its daily maximum at a fixed local time. Use total_fee as the computed charge in the same currency unit as the three submitted rates. For API automation, successful requests use the published base price of $0.002 per item, while the browser can use the same pure calculation.

Test parking payment software

Create deterministic fixtures for started-hour billing, 24-hour boundaries, and daily-cap behavior.

What happens when the duration is negative?

The request fails with an invalid_input error because a negative parking duration is not valid for this calculation.

What does an API calculation cost?

A successful API request costs $0.002 per item.

Read the full KIT documentation →