Rants, Ideas, Stuff

A blog about coding, coffee, and stuff

Depreciation in Personal Finance with Hledger

We all know the spikes in our expenses when we buy a new washing machine or a new gadget. Accounting has a method to flatten these spikes over a longer period of time. This method is called “Depreciation”.

Businesses depreciate long-term assets because they want to even out the tax implications and to have better looking income statements.

In personal finance I haven’t come across depreciation, yet. But I think it is a fitting concept, that goes hand in hand with budgeting.

I depreciate two kinds of tangible assets in Hledger in two different ways.

  1. assets I want to sell after a fixed amount of time
  2. assets I use until I replace them

Resellable Assets

For assets I want to sell I add a commodity when buying like this:

2016/09/10 * Apple | Buying the new iPhone
  Assets:Devices:iPhone  1 iPhoneSeven @@ 869.00 EUR
  Assets:Cash:Checking

Over the months of usage I get the current salvage value for the device from sites like reBuy and add market prices to my journal:

P 2017/08/31 iPhoneSeven 496.71 EUR
P 2018/01/02 iPhoneSeven 445.00 EUR
P 2018/06/09 iPhoneSeven 423.93 EUR

Also I calculate a monthly depreciation for the usage of the device where the sum of all monthly expenses should be the difference between the salvage value and the purchase price. This results in monthly transactions like this:

2016/09/10 * iPhone 7 depreciation
  Expenses:Gadgets:iPhone  20.00 EUR
  Equity:AccumulatedDepreciation

At the end of its lifetime the selling transaction might look like this:

2018/09/06 Selling iPhone 7
  Assets:Cash:Checking  400.00 EUR
  Assets:Devices:iPhone  -1 iPhoneSeven @@ 400.00 EUR
  Income:iPhone

Devices I use till they die (linear depreciation)

For devices I expect to use until they die I just book them to an account and depreciate them every month with an amount a calculte by dividing the purches price by the expected lifetime:

2015/09/01 * Buying a washing machine
  Assets:Devices:WashingMachine  350.00 EUR
  Assets:Cash:Checking

2015/09/01 * washing machine depretiation
  Expenses:Devices:WashingMachine  7.00 EUR
  Assets:Devices:WashingMachine

Depretiation and Saving

If I use my “depreciation rates” and save them each month, then I’m set to buy a new device at the end of the expected lifetime:

2016/01/01 * Opening Balance
  Assets:Cash:Checking  1,000.00 EUR
  Equity:Opening

2016/09/10 * Apple | Buying the new iPhone
  Assets:Devices:iPhone  1 iPhoneSeven @@ 869.00 EUR
  Assets:Cash:Checking

2016/09/10 * iPhone 7 depreciation
  Expenses:Gadgets:iPhone          20.00 EUR
  Equity:AccumulatedDepreciation  -20.00 EUR
  [Assets:Savings:iPhone]          20.00 EUR
  [Assets:Cache:Checking]         -20.00 EUR

2016/10/01 * iPhone 7 depreciation
  Expenses:Gadgets:iPhone          20.00 EUR
  Equity:AccumulatedDepreciation  -20.00 EUR
  [Assets:Savings:iPhone]          20.00 EUR
  [Assets:Cache:Checking]         -20.00 EUR

2016/11/01 * iPhone 7 depreciation
  Expenses:Gadgets:iPhone          20.00 EUR
  Equity:AccumulatedDepreciation  -20.00 EUR
  [Assets:Savings:iPhone]          20.00 EUR
  [Assets:Cache:Checking]         -20.00 EUR

; ...

2018/09/06 * Selling iPhone 7
  Assets:Cash:Checking  400.00 EUR
  Assets:Devices:iPhone  -1 iPhoneSeven @@ 400.00 EUR
  Income:iPhone

P 2017/08/31 iPhoneSeven 496.71 EUR
P 2018/01/02 iPhoneSeven 445.00 EUR
P 2018/06/09 iPhoneSeven 423.93 EUR

The resulting balance would be:

$ hledger bal --flat iphone

          900.00 EUR  Assets:Savings:iPhone
          500.00 EUR  Expenses:Gadgets:iPhone

And we could buy our next fancy gadget!