How the standard mileage deduction is calculated, with the IRS worked examples
The calculator uses the formulas below. Each one comes from the IRS text quoted under it. The code is one JavaScript module, /js/mileage.mjs.
Picking the rate
Pick the cents-per-mile rate for a category (business, charity, medical, military moving) from the IRS table row whose period contains the date the miles were driven. Years with a mid-year change (2011, 2022, 2026) have two rows. Medical and military moving share one column.
cents_per_mile = table[category] for the row with period_start <= trip_date <= period_end
If you use your car for business, charity, medical or moving purposes, you may be able to take a deduction based on the mileage used for that purpose.
Years with two rate periods
In 2026 the revised rates apply only to miles driven on or after July 1, 2026; miles before that date use the Notice 2026-10 rates. The deduction for the year is the sum over the two periods. The same split applies to 2022 (IR-2022-124) and 2011 (IR-2011-69) using their table rows.
mileage_amount_usd = miles_jan_jun * rate_jan_jun / 100 + miles_jul_dec * rate_jul_dec / 100
apply to deductible transportation expenses paid or incurred for business, medical, or moving expense purposes on or after July 1, 2026.
Miles times the rate
Standard mileage amount: miles driven for the purpose times the rate in dollars per mile (cents / 100). Shown to the cent.
mileage_amount_usd = miles * cents_per_mile / 100
Multiply the number of business miles driven by 0.70. For example, 1,250 business miles driven × 0.70 = $875.00;
Parking fees and tolls
Parking fees and tolls for the same purpose are added on top of the standard mileage amount (commuting parking is not deductible).
total_usd = mileage_amount_usd + parking_fees_and_tolls_usd
In addition to using the standard mileage rate, you can deduct any business-related parking fees and tolls. (Parking fees you pay to park your car at your place of work are nondeductible commuting expenses.)
Medical miles
Medical car expense with the standard medical mileage rate plus parking fees and tolls.
medical_total_usd = medical_miles * medical_cents_per_mile / 100 + parking_fees_and_tolls_usd
If you don’t want to use your actual expenses for 2025, you can use the standard medical mileage rate of 21 cents a mile. You can also include parking fees and tolls.
Charity miles
Charitable car expense with the 14 cents a mile rate (fixed by statute) plus parking fees and tolls.
charity_total_usd = charity_miles * 14 / 100 + parking_fees_and_tolls_usd
If you don’t want to deduct your actual expenses, you can use a standard mileage rate of 14 cents a mile to figure your contribution. You can deduct parking fees and tolls whether you use your actual expenses or the standard mileage rate.
Military moving miles
Moving car expense for members of the Armed Forces with the standard mileage rate (same column as medical) plus parking fees and tolls.
moving_total_usd = moving_miles * medical_or_moving_cents_per_mile / 100 + parking_fees_and_tolls_usd
You can deduct as car expenses either: Your actual out-of-pocket expenses such as gas and oil, or The standard mileage rate of 21 cents a mile. You can add parking fees and tolls to the amount claimed under either method.
Business-use percentage
Business-use share of a car driven for business and personal purposes, from miles.
business_use_pct = business_miles / total_miles * 100
You can claim only 60% (12,000 ÷ 20,000) of the cost of operating your car as a business expense.
IRS worked examples
Each row is an example printed by the IRS, run through the calculator code.
| Inputs | IRS text | Calculator result |
|---|---|---|
| 1,250 business miles in 2025 | “Multiply the number of business miles driven by 0.70. For example, 1,250 business miles driven × 0.70 = $875.00;” Instructions for Schedule C (Form 1040) (2025), Part II, Line 9 | mileage $875.00 |
| 2,800 medical miles in 2025, $100.00 parking and tolls | “You multiply 2,800 miles by 21 cents a mile for a total of $588. Then you add the $100 tolls and parking and mileage for a total of $688 (588 + 100).” Publication 502 (2025), Transportation > Car expenses > Example | mileage $588.00; total $688.00 |
| 440 business miles in 2025 | “$308 for mileage (440 miles × 70 cents a mile)” Publication 3 (2025), How To Report My Reserve-Related Travel Expenses > Example | mileage $308.00 |
| 10,000 business miles in 2025 | “Because their $7,000 expense figured under the standard mileage rate (10,000 miles x 70 cents ($0.70) per mile)” Publication 463 (2025), 6. Reimbursements > Per Diem and Car Allowances > Allowance less than or equal to the federal rate > Example 3 | mileage $7,000.00 |
| 12,000 business miles of 20,000 total | “You can claim only 60% (12,000 ÷ 20,000) of the cost of operating your car as a business expense.” Publication 463 (2025), 4. Transportation > Business and personal use > Example | business use 60% |