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

# Mileage Tracking

> Mileage tracking page with trip management and deduction calculations.

The Mileage Tracking view provides an interface for tracking business mileage, categorizing trips, and calculating tax deductions.

![Mileage Tracking](https://layer-public.s3.us-west-2.amazonaws.com/documentation-images/mileage_tracking.png)

```tsx theme={null}
import { MileageTracking } from '@layerfi/components'

<MileageTracking />
```

## Features

* **Mileage Summary Statistics**: Overview of total deduction, miles, and trips
* **Category Breakdown**: Business, personal, and uncategorized trips
* **Monthly Deduction Chart**: Visual representation of mileage deductions by month
* **Trip Management**: Detailed list of tracked trips with categorization
* **Year Selection**: Filter trips and statistics by tax year
* **Tax Deduction Calculation**: Automatic calculation using IRS standard mileage rate

## Usage Examples

**Basic usage:**

```tsx theme={null}
<MileageTracking />
```

**Without title header:**

```tsx theme={null}
<MileageTracking showTitle={false} />
```

## Properties

<ParamField body="showTitle" type="boolean" default="true">
  Whether to display the page title header "Mileage Tracking".
</ParamField>

## Component Structure

### MileageTrackingStats

Summary statistics and chart:

* **Total Deduction**: Estimated tax deduction based on business miles
* **Total Miles**: Business, personal, and uncategorized miles
* **Total Trips**: Count of trips by category
* **Monthly Chart**: Bar chart showing monthly mileage deductions

### Trips

Detailed trip list:

* Trip date, time, and locations
* Distance traveled
* Trip category (Business, Personal, Uncategorized)
* Categorization and editing capabilities

## Deduction Calculation

Deductions are calculated using the IRS standard mileage rate:

* Only business-categorized miles contribute to deductions
* Example (2024 rate of $0.67/mile): 1,000 business miles = $670 deduction
* Personal and uncategorized miles do not contribute to deductions

## Trip Categorization

* **Business**: Miles for business purposes (tax deductible)
* **Personal**: Personal travel (not deductible)
* **Uncategorized**: Trips awaiting categorization
