I have a small business which involves some driving to clients using my personal vehicle. I track both my individual auto expenses and my mileage in GNUCash but so far have only been using the standard mileage deduction. I also have a separate set of books in GNUCash for my personal accounts. Even though I'm currently a single member LLC I may move to S-Corp status.

What is the best way to account for my mileage expenses in GNUCash?

Right now I have an "Owner Equity" account under Equity. When I invest money into the business or take money out it goes into this account.

I also have a Mileage Expense account. For any day that I drove for work, I calculate the miles driven for work times the IRS standard deduction and credit it to my Mileage Expense account. Since there's no actual money changing hands and this is an expense I'm incurring personally I use the Owner Equity account as the transfer account.

Does that make sense to do it that way? Is there a better way to do it?

1 Answer 1


You can create commodities for whatever you want in your account hierarchy.

Personally, I have created commodities for gas and miles, and each time I fill up my tank I'll write down my current mileage on the gas receipt. Then, when entering the transaction I have 4 splits: credit card -> buy X shares (gallons) of fuel; then: sell X shares fuel -> buy Y shares (distance) of miles.

This allows me to do a few really cool things- first and foremost I can run a query into my gnucash database and plot out my gas mileage over time (gallons needed to get back to full / miles driven since the last fill-up).

It would be a simple thing for me to create a subaccount of miles, call it "work miles" or similar, and after tracking those miles between fill-ups they could be entered with an extra split in my gas transaction. If instead of selling gas to purchase miles (which might mess around with your "fuel expense" tracking), you wanted to purchase those miles from a "Liabilities:Tax Rebate" source account, I suppose that would work also. Then at the end of the tax year you could sell all accumulated miles at a rate which would allow you to balance the Liabilities account back to zero. Whatever works for your situation.

  • What is the account type of your Commodities accounts? Only options I see are Bank, Cash, Asset, Credit Card, Liability, Stock, etc. no commodoties. Commented Mar 21, 2022 at 22:48
  • 1
    Account type is Stock. Then in the new account window you can select the "Security/currency" that the account is tied to (ie the commodity). You can add the new commodity through the "select" dialog, or by opening Tools > Security Editor > Add. You're working within the framework intended for stocks, so many of the fields will be optional. You can set Full Name / Symbols to "GAS" or "MILES", and in the "Type" field enter "VEHICLE". it would be worth looking into a quick tutorial on stocks in gnucash to get familiar with this. Commented Mar 21, 2022 at 23:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .