In this part of the discussion of membership programs, we get hledger to do some of the work for us in terms of calculating savings. A few days ago, in the Plain Text Accounting forum, jbrains posted a solution to do exactly that. So, with a couple of minor changes, I have used the same solution.
First, though, let’s explain in words what’s happening. We have a new month of membership, so a new payment of $5.00. For the $5.00 payment we get a benefit of $10.00, which means we net $5.00 of potential benefits. I set up the transaction like this:
2025-04-07 ABC Membership expenses:ABC membership -M5.00 assets:ABC benefits M5.00 expenses:membership $5.00 liabilities:credit card -$5.00
In addition to the membership fee for this month, there was an actual purchase at ABC. The final cost was $1.13, after the $10.00 credit plus some other applicable coupons. Thus, I recorded the following transaction:
2025-04-13 ABC expenses $1.13 liabilities:credit card -$1.13
Now, to calculate the benefits, I need to compare the cost of what I bought at ABC, versus an alternative. There is a long story here, but to simplify it, the equivalent purchase at another store would have been $8.48.
Putting all the above together, we have the following transaction:
2025-04-13 ABC assets:ABC benefits -M5.00 ; realized benefit by using the membership to make a purchase (re 4-7 ABC Membership transaction) assets:ABC benefits -M8.48 ; cost avoided by not buying the goods elsewhere assets:ABC benefits M1.13 ; actual cost of goods at membership store assets:ABC savings
Let’s see how it works. I run the command
hledger areg "ABC benefits"
Which gives me the following output:
Transactions in assets:ABC benefits and subaccounts: 2025-04-07 ABC Membership ex:ABC membership, ex:member.. M5.00 M5.00 2025-04-13 ABC as:ABC savings M-12.35 M-7.35
This month, the savings are $7.35. As noted previously, I use the “M” currency instead of the dollar sign. Otherwise the savings will show up as income, which doesn’t work for my purposes.
A couple of final comments. The coupons I used lowered the price by $4.72. Therefore, without the coupons my savings would have been less. Not only would it have been $4.72 less, but I also avoided paying sales tax on those $4.72. If I hadn’t been able to use those coupons, my savings would have been $2.35. (Calculation: $7.35 – $4.72 = $2.63. Subtract the sales tax of $0.28, and the result is $2.35.)
The reason I mention all this is to note the effect of the coupons. If no coupons are available in the future, and the prices remain the same, I can now see what my savings would be for making the same purchase.
As I have said in previous posts, I am not recommending that anyone track their membership savings. However, I hope that simply reading the discussion is enlightening.