SOLE TRADERS · PIVOT TABLE GUIDE

Total your business mileage for the 45p claim with a pivot table

Short answer: Log each business journey with a date and miles, pivot with Date in rows grouped by month and Sum of Miles in values, then apply the HMRC mileage rates to the total.

Updated 2 December 2026

If you use your own car for business, you can usually claim a flat rate per business mile instead of working out actual running costs. To do that you need an accurate total of business miles for the tax year, which is exactly what a pivot table gives you.

Keep a simple log

One row per business journey is enough. You can download a blank mileage log template.

DateJourneyMilesVehicle
26/04/2026Trade show, Birmingham296Car
07/04/2026Client visit, Chichester44Car
17/08/2026Client visit, Fareham24Car

Record the round trip in Miles if you drove there and back. Ordinary commuting to a permanent workplace usually doesn’t count as business mileage.

Make the pivot table

  1. Paste your log into the pivot table builder, or create a pivot table in Excel or Sheets.
  2. Put Date in Rows. The builder groups it by month.
  3. Put Miles in Values with Sum.
  4. If you use more than one vehicle, add Vehicle to Columns.
Open the sample mileage logOpens the free pivot table builder with sample data

Work out the claim

Take the grand total of miles for the tax year, from 6 April to 5 April, and apply the rates. Using the rates above:

Business miles in the yearClaim
6,0006,000 × £0.45 = £2,700
10,00010,000 × £0.45 = £4,500
14,000£4,500 + (4,000 × £0.25) = £5,500

If your log covers more than one tax year, filter the dates first so you only total the right one.

Tips for a log that stands up

  • Write each journey down when you make it, not months later.
  • Note where you went and why.
  • Keep the log with your other records for at least the period HMRC asks you to keep them.

SKIP THE MENUS

Make a pivot table in seconds

Paste cells from Excel or Google Sheets and pick your rows, columns and calculation. Free, no sign-up, and nothing is uploaded.

Open the pivot table builder →