Skip to main content

3 posts tagged with "financial tracking"

View All Tags

Navigating Receivables in Beancount

· 3 min read
Mike Thrift
Mike Thrift
Marketing Manager

In the labyrinth of personal finance management, Beancount emerges as a beacon of clarity and precision for plain-text bookkeeping. Particularly when it comes to managing receivables—money expected from others—Beancount offers a structured approach to keep your financial records in impeccable order. This blog will guide you through the intricacies of tracking receivables, processing refunds, and managing unresolved transactions with Beancount. Whether you're returning a purchase, lending money, or awaiting a refund, this post is your roadmap to financial clarity.

Understanding Receivables in Beancount:

2024-02-17-navigating-receivables-beancount-guide

Receivables represent money that is owed to you. This could be from a variety of scenarios, such as after a shopping return awaiting a refund or when you lend money to someone. For instance, consider you've returned a watch strap to an online store like Amazon.com and are awaiting a refund. In Beancount, this transaction is recorded as money moving from your credit card liability to your assets as receivables:

2023-10-31 * "Amazon.com" "[Return] Watch Strap"
Liabilities:CreditCard:Chase -12.00 USD
Assets:Receivables

Managing Refunds:

Once the refund is processed and you receive the money, another transaction is recorded to offset the balance in Receivables. This ensures that your accounts reflect the money back in your possession:

2023-11-01 * "Amazon.com" "[Refund] Watch Strap"
Liabilities:CreditCard:Chase 12.00 USD
Assets:Receivables

Complete Transaction Cycle:

A complete in-and-out transaction involving receivables is combining both transactions above and showcased as follows, demonstrating a balanced account post-refund:

2023-10-31 * "Amazon.com" "[Return] Watch Strap"
Liabilities:CreditCard:Chase -12.00 USD
Assets:Receivables

2023-11-01 * "Amazon.com" "[Refund] Watch Strap"
Liabilities:CreditCard:Chase 12.00 USD
Assets:Receivables

Handling Unresolved Transactions:

For transactions where the refund or repayment has not yet been received, Beancount employs the #UNRESOLVED tag. This tag helps in identifying and tracking amounts that are still pending. For example:

2023-10-31 * "John Doe" "Lending Money" #UNRESOLVED
Liabilities:CreditCard:Chase -100.00 USD
Assets:Receivables

By focusing on transactions tagged as #UNRESOLVED, you can quickly ascertain which amounts are yet to be settled.

Maintaining a Zero Balance:

In a proper ledger, the sum of all transactions under the Assets:Receivables account, excluding those tagged with #UNRESOLVED, should ideally return to zero. This ensures that all expected funds have been accounted for, maintaining the integrity of your financial records.

For example, a valid ledger might look like this, with an unresolved transaction clearly marked, awaiting closure:

2023-10-31 * "Amazon.com" "[Return] Watch Strap"
Liabilities:CreditCard:Chase -12.00 USD
Assets:Receivables

2023-11-01 * "Amazon.com" "[Refund] Watch Strap"
Liabilities:CreditCard:Chase 12.00 USD
Assets:Receivables

2023-10-31 * "John Doe" "Lending Money" #UNRESOLVED
Liabilities:CreditCard:Chase -100.00 USD
Assets:Receivables

An invalid ledger is one where a transaction causes the Receivables account not to zero out, necessitating the #UNRESOLVED tag for correction.

Conclusion

Navigating receivables in Beancount doesn't have to be daunting. With a clear understanding of how to record transactions, manage refunds, and keep an eye on unresolved transactions, you can maintain accurate and reliable financial records. Embracing the structured approach of Beancount for receivables management not only simplifies your financial tracking but also brings peace of mind, knowing that every dime is accounted for. So, why not leverage the power of Beancount to make your financial management as smooth

Understanding Receivables and Payables in Beancount

· 3 min read
Mike Thrift
Mike Thrift
Marketing Manager

Hello everyone! In today's blog post, we're diving into the world of Beancount, a double-entry accounting tool that's loved by many for its simplicity and power. More specifically, we're going to talk about two key concepts: Receivables and Payables.

Understanding these terms is crucial to using Beancount (or any double-entry accounting system) effectively. But don't worry if you're a beginner - we're going to break it all down, step by step!

Receivables and Payables: The Basics

2023-05-30-receiveable-and-payable

In accounting, "receivables" and "payables" are terms used to track money that is owed. "Receivables" refers to money that others owe to you, while "payables" refers to money that you owe to others.

Let's take an example:

  1. Accounts Receivable (A/R): Suppose you own a bookstore and a customer buys a book on credit. The money they owe you for the book is an account receivable.

  2. Accounts Payable (A/P): On the flip side, imagine you order a new set of books from a publisher, but you don't pay for them upfront. The money you owe the publisher is an account payable.

In Beancount, these are typically tracked through corresponding accounts. The main benefit here is that it provides you with a clear and accurate picture of your financial position at any point in time.

Setting Up Receivables and Payables in Beancount

The structure of your Beancount file can be as simple or as complex as you need it to be. For receivables and payables, you'll likely want to create separate accounts under your Assets and Liabilities sections.

Here is a simple example:

1970-01-01 open Assets:AccountsReceivable
1970-01-01 open Liabilities:AccountsPayable

Tracking Transactions

Payee side

After setting up your accounts, you can track transactions that involve receivables and payables. Let's look at an example:

2023-05-29 * "Sold books to customer on credit"
Assets:AccountsReceivable 100 USD
Income:BookSales -100 USD

Here, you're adding $100 to your receivables because a customer owes you this amount. Simultaneously, you're reducing your income by the same amount to maintain the balance (since you haven't actually received the money yet).

When the customer eventually pays, you'll record it like this:

2023-06-01 * "Received payment from customer"
Assets:Bank:Savings 100 USD
Assets:AccountsReceivable -100 USD

Payer side

The same principle applies for payables, but with reversed signs:

2023-05-30 * "Bought books from publisher on credit"
Liabilities:AccountsPayable 200 USD
Expenses:BookPurchases -200 USD

And when you pay off your debt:

2023-06-02 * "Paid off debt to publisher"
Liabilities:AccountsPayable -200 USD
Assets:Bank:Checking 200 USD

Wrapping Up

Receivables and payables are at the heart of any accounting system. By accurately tracking these, you gain a comprehensive understanding of your financial health.

This is just a starting point, and Beancount is capable of much more. I hope this blog post helps clarify these important concepts. As always, happy accounting!

Net Income 101 — and How to Track It in Beancount

· 5 min read
Mike Thrift
Mike Thrift
Marketing Manager

Of all the numbers that describe a business, one stands above the rest: net income. It’s the ultimate measure of profitability, the famous "bottom line." But what does it really mean, and how can you track it with precision using a plain-text accounting system like Beancount?

Let's break it down.

2020-03-12-net-income-101-how-to-track-it-in-beancount

What Net Income Really Means

At its core, net income is the money left over after you’ve paid for absolutely everything required to run your business. This includes the cost of goods sold (COGS), all operating expenses, interest on debt, and taxes.

It’s the clearest single indicator of a company’s financial health. It’s a critical figure for everyone:

  • Lenders look at it to gauge your ability to repay loans.
  • Investors see it as the source of potential dividends or the capital available for growth.
  • Founders rely on it to understand their financial runway and make strategic reinvestment plans.

A positive net income means you’re profitable. A negative one means you’re losing money. It’s that simple.

The Core Formula (Pick the Detail Level You Need)

You can calculate net income with varying degrees of granularity. The choice depends on how detailed an analysis you need.

  • Full Formula: Revenue – COGS – Operating Expenses – Interest – Taxes = Net Income
  • Standard Formula: Revenue – COGS – Expenses = Net Income
  • Quick & Dirty Formula: Total Revenues – Total Expenses = Net Income

A Quick Tip on Costs: What's the difference between COGS and operating expenses? COGS (Cost of Goods Sold) covers direct costs tied to producing your goods or services (e.g., raw materials, direct labor). Operating Expenses cover everything else that keeps the lights on—salaries, rent, software subscriptions, insurance, etc.

A Mini Example

Let's make this tangible. Imagine a small coffee roasting business had the following results last month.

ItemAmountExample Ledger Account
Sales Revenue$60,000Income:Sales
COGS (Green coffee beans)$20,000Expenses:COGS
Operating Expenses$18,000Expenses:Ops:*
Interest (On equipment loan)$1,000Expenses:Interest
Taxes$1,000Expenses:Taxes

Using the full formula, the calculation is straightforward:

Net;Income=Net;Income = 60,000 - 20,00020,000 - 18,000 - 1,0001,000 - 1,000 = 20,00020,000

The business generated a true profit of $20,000 for the month.

How to Capture It in Beancount

Beancount’s structure is perfect for this. By organizing your accounts logically, calculating net income becomes an automatic byproduct of good bookkeeping.

  • Tag all revenue under a parent Income account, like Income:Sales or Income:Services.
  • Split your expenses to distinguish between direct and indirect costs. Use Expenses:COGS for direct costs and sub-accounts like Expenses:Ops:Salaries or Expenses:Ops:Software for everything else.
  • Post interest and taxes to their own accounts (Expenses:Interest, Expenses:Taxes). This makes future analysis, especially for tax preparation, much simpler.
  • Balance your books regularly. The fundamental accounting equation, Assets = Liabilities + Equity, must always hold true.

At the end of a period (e.g., a month), you can use balance assertions to confirm the state of your accounts. These entries don't move money; they declare what the balance should be, and bean-check will report an error if it isn't.

; 2025-07-31 Coffee Roaster Enterprises — July close
2025-07-31 balance Assets:Bank:Operating 42000.00 USD
2025-07-31 balance Expenses:COGS 20000.00 USD
2025-07-31 balance Expenses:Ops 18000.00 USD
2025-07-31 balance Expenses:Interest 1000.00 USD
2025-07-31 balance Expenses:Taxes 1000.00 USD
2025-07-31 balance Income:Sales -60000.00 USD

One-Line Net Income Query

This is where the magic happens. With a well-structured ledger, you can calculate your net income for any period with a single command.

bean-query books.beancount \
"SELECT period, sum(number) WHERE account =~ '^(Income|Expenses)' \
AND year = 2025 GROUP BY month"

This query sums up all values in your Income and Expenses accounts for 2025 and groups them by month. In Beancount, income is represented by negative numbers and expenses by positive ones, so the result will be the negative of your net income.

Even better, you don't even have to run this query manually. Fava, the web interface for Beancount, will plot this automatically for you in its Reports → Income Statement view.

Fast Insights You Can Automate

Because your ledger is just a text file, you can build powerful automated workflows around it.

  • Monthly E-mail Digest: Set up a cron job to run bean-report books.beancount income_statement > net-income.txt and then email the resulting text file to yourself on the first of every month.
  • Profitability Alert: Use a Git pre-commit hook that runs a query to check month-to-date profitability. You can program it to refuse the commit if net income is negative, forcing you to acknowledge a losing month.
  • Scenario Modeling: Want to stress-test your business? Just copy books.beancount to scenarios/recession.bean, reduce your Income entries by 20%, and rerun your net income query to see the impact instantly.

Key Takeaways

  • Net income is your true bottom line. The goal is to keep it positive and understand its trend over time.
  • Beancount makes the underlying math explicit, searchable, and version-controlled. There are no hidden formulas.
  • With a disciplined account structure and a single query, you’ll always know whether your business is truly making money.