If you drive for work, volunteer for a charity, go to medical appointments, or made a military move this year, the IRS lets you deduct a flat amount per mile instead of tracking every receipt for gas and oil. The catch is that the rate depends on the purpose of the trip, the year, and sometimes even which half of the year you drove in. Here's exactly how the IRS computes it, and a free calculator built straight off the published rate table.
The rate table, not a guess
The IRS sets four mileage rates each year: business, charity, medical, and military moving (medical and moving share the same rate). For 2026, the rate is 76 cents per business mile, 14 cents per charity mile, and 23.5 cents per medical/military-moving mile, per IR-2026-29.
The core formula is just:
mileage_amount_usd = miles * cents_per_mile / 100 Then you add any parking fees and tolls for those same trips on top — but not parking at your regular place of work, which the IRS treats as a non-deductible commuting cost:
total_usd = mileage_amount_usd + parking_fees_and_tolls_usd The twist: years with two rates
Three recent years — 2011, 2022, and 2026 — had a rate change mid-year. For those years you can't just multiply total annual miles by one rate; you have to split the miles by which half of the year they were driven in and apply each period's rate separately:
mileage_amount_usd = miles_jan_jun * rate_jan_jun / 100 + miles_jul_dec * rate_jul_dec / 100 In 2026, the revised rate applies only to miles driven on or after July 1, 2026 (Notice 2026-10 governs the first half).
A worked IRS example
The IRS's own instructions for Schedule C (Form 1040), Part II, Line 9, give this example for 2025:
"Multiply the number of business miles driven by 0.70. For example, 1,250 business miles driven × 0.70 = $875.00"
Run that through the formula above: 1,250 * 70 / 100 = $875.00 — matches exactly, because the calculator is the formula, not an estimate.
A second example, for medical miles, comes from IRS Publication 502: 2,800 medical miles at 21 cents/mile plus $100 of tolls and parking —
2,800 * 21 / 100 = $588.00 mileage $588.00 + $100.00 parking/tolls = $688.00 total — again matching the IRS's printed number dollar-for-dollar.
Business-use percentage
If you use one car for both business and personal driving, the IRS also defines the share of total costs you can treat as business use, straight from miles:
business_use_pct = business_miles / total_miles * 100 Publication 463's example: 12,000 business miles out of 20,000 total miles driven → 60% business use.
Try it
The free Mileage Deduction Calculator walks through purpose (business/charity/medical/military moving), tax year, and miles driven, splitting mid-year rate changes automatically, and shows the dollar result with parking and tolls added on top. The full breakdown of every formula against its IRS source text — including all five worked examples above — is on the site's How it is calculated page.
This is not tax or financial advice. It implements the IRS's published standard mileage rates and formulas as a convenience; always confirm your specific deduction against the current IRS instructions or a tax professional, especially if you're also claiming actual vehicle expenses or depreciation, which this tool doesn't cover.