> ## Documentation Index
> Fetch the complete documentation index at: https://dhanurgo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Utilization Calculation

> How fleet and vehicle utilization percentages are computed

# Utilization Calculation

Utilization measures how effectively the fleet is being rented out.

## Formula

```
Utilization % = (Actual Rental Days / Rentable Days) x 100
```

Capped at 100% (overlapping trips can't exceed it).

## Actual Rental Days

Calculated from trip timestamps — NOT from the `trip_days` field (which can be inaccurate):

```typescript theme={null}
const actualDays = trips.reduce((sum, trip) => {
    const start = new Date(trip.trip_start);
    const end = new Date(trip.trip_end);
    const days = (end.getTime() - start.getTime()) / (1000 * 60 * 60 * 24);
    return sum + Math.max(days, 0);
}, 0);
```

<Warning>
  The `trip_days` field from Turo's CSV sometimes reports rounded values. Always use `trip_start` and `trip_end` timestamps for accurate day calculations.
</Warning>

## Rentable Days

The number of days a vehicle could have been rented:

```
Rentable Days = Days from first trip date to TODAY
```

For fleet-level utilization, this is summed across all active vehicles.

## Worked Example

**Vehicle: 2024 Tesla Model 3**

* First trip: January 1, 2026
* Today: March 10, 2026
* Rentable days: 69 days

**Trips this period:**

| Trip      | Start  | End    | Days          |
| --------- | ------ | ------ | ------------- |
| Trip 1    | Jan 3  | Jan 6  | 3.0           |
| Trip 2    | Jan 10 | Jan 17 | 7.0           |
| Trip 3    | Jan 25 | Jan 28 | 3.0           |
| Trip 4    | Feb 1  | Feb 8  | 7.0           |
| Trip 5    | Feb 15 | Feb 22 | 7.0           |
| Trip 6    | Mar 1  | Mar 5  | 4.0           |
| **Total** |        |        | **31.0 days** |

```
Utilization = (31.0 / 69) x 100 = 44.9%
```

## Fleet-Level Utilization

For the entire fleet:

```
Fleet Utilization = Sum(all vehicle actual days) / Sum(all vehicle rentable days) x 100
```

Only vehicles with status `active` and at least one trip are included.

## Per-Vehicle Metrics

The dashboard also calculates per-vehicle:

* **Average Daily Rate** = Vehicle earnings / Actual rental days
* **Revenue per Rentable Day** = Vehicle earnings / Rentable days
* Vehicles are ranked by earnings in the KPI dashboard

## Key File

`src/lib/kpi/calculations.ts` (lines \~200-280) — Contains the utilization calculation logic.
