Skip to main content

2 posts tagged with "taxes"

View all tags

Recording Taxes in Beancount (The Pragmatic Way)

· 8 min read
Mike Thrift
Mike Thrift
Marketing Manager

Taxes can feel like a special, complicated beast in the world of personal finance. But what if they weren't? What if you could treat them just like any other flow of money in your ledger? Good news: you can. By treating taxes as simple movements of value, your Beancount ledger will stay clean, easy to query, and—most importantly—understandable.

Below is a practical, no-nonsense pattern you can drop into a personal or small-business Beancount file. It’s a simple system for handling paychecks, tax payments, and even those pesky refunds that cross over into the new year. We'll cover the essential accounts you need, walk through real-world examples, and show you the exact queries to run to get the answers you need.

2025-08-25-recording-taxes-in-beancount


The Core Principles

Before we dive into the code, let's agree on a few simple rules. These principles keep things logical and prevent future headaches.

  • Separate "what it is" from "when the cash moves." 🗓️ This is the most important concept. A tax expense belongs to the year you earned the income (e.g., 2024), even if you settle the bill with the IRS in April 2025. If you don't separate the timing of the expense from the timing of the cash payment, your year-over-year reports will get messy and misleading.

  • Keep your account hierarchy boring and simple. 📁 Name your accounts clearly based on the type of tax (e.g., IncomeTax, SocialSecurity). This makes your queries incredibly simple. Don't clutter account names with vendor names or form numbers like "W-2" or "1099"; use metadata and tags for those details instead.

  • Embrace accrual for year-end adjustments. ⚖️ Even for a personal ledger, using a simple accrual entry at year-end is the cleanest way to make your reports accurate. It means recognizing an expense or refund in the correct year, even if the money doesn't move until the next. It’s one small extra step that saves you from mental gymnastics later.

  • Write for your future self. 🧠 Your goal is clarity. Only add extra details, like the tax year, to an account name if it genuinely makes your queries easier. Avoid creating a new set of accounts every single year (Expenses:Taxes:2024:Federal, Expenses:Taxes:2025:Federal, etc.) unless you have a compelling reason. A flat structure is often easier to manage.


A Minimal Account Skeleton

Here’s a basic set of accounts to get you started. This structure is US-centric, but you can easily adapt the names for your own country's tax system. Just drop these open directives into your Beancount file.

; --- US Federal Income & Payroll Taxes ---
; For money withheld from your paycheck
2024-01-01 open Expenses:Taxes:Federal:IncomeTax:Withheld USD
; For estimated payments or tax-day bills you pay directly
2024-01-01 open Expenses:Taxes:Federal:IncomeTax:Payments USD
; For tax refunds you receive
2024-01-01 open Expenses:Taxes:Federal:IncomeTax:Refunds USD

; Your FICA contributions
2024-01-01 open Expenses:Taxes:Federal:SocialSecurity USD
2024-01-01 open Expenses:Taxes:Federal:Medicare USD

; --- Other Common Taxes ---
; For sales/use taxes you pay on purchases
2024-01-01 open Expenses:Taxes:Sales USD

; --- Accounts for Year-End Adjustments (Optional but Recommended!) ---
; A temporary holding account for taxes you owe but haven't paid yet
2024-01-01 open Liabilities:AccruedTaxes:Federal:Income USD
; A temporary holding account for a refund you're owed but haven't received
2024-01-01 open Assets:Tax:Receivable USD

This setup separates withheld taxes from direct payments and refunds, making it easy to see exactly where your money went. The Liabilities and Assets accounts are our secret weapon for keeping year-end reporting accurate.


Example 1: The Paycheck

Let's book a typical paycheck where taxes are withheld automatically. The key is to record your gross pay first, then show how it was split between taxes and the cash that actually landed in your bank account.

2025-07-15 * "Employer Inc." "Salary for first half of July"
Income:Work:Salary -6,000.00 USD
Expenses:Taxes:Federal:IncomeTax:Withheld 1,200.00 USD
Expenses:Taxes:Federal:SocialSecurity 372.00 USD
Expenses:Taxes:Federal:Medicare 87.00 USD
Assets:Cash:Checking 4,341.00 USD

This single transaction tells the whole story:

  • You earned $6,000 in gross income.
  • $1,200 of it was sent to the IRS for federal income tax.
  • 372wenttoSocialSecurityand372 went to Social Security and 87 to Medicare.
  • The remaining $4,341 is what you took home.

Pro-tip: You can attach metadata from your pay stub (like pay_period_end: "2025-07-15") to the transaction for an easy audit trail.


Example 2: Filing Your Return (The Year-Crossing Problem)

Here's the scenario that trips people up: It's April 2025, and you're filing your 2024 taxes. You learn that after all your withholding, you still owe an extra $3,000.

How do you record this? You want the expense to count toward 2024, but the cash payment happens in 2025. Here are two excellent ways to handle it.

Option A: The Manual Two-Step Accrual

This method is pure Beancount, no plugins required. It's a clear, two-step process.

Step 1: Recognize the expense at the end of the tax year. On the last day of 2024, you create a "true-up" entry. No cash is moving yet; you're just acknowledging the expense and parking it in a temporary liability account.

2024-12-31 * "Federal income tax true-up for 2024"
Expenses:Taxes:Federal:IncomeTax:Payments 3,000.00 USD
Liabilities:AccruedTaxes:Federal:Income -3,000.00 USD

Now, your 2024 income statement correctly shows this $3,000 expense.

Step 2: Record the cash payment when it happens. In April 2025, when you actually send the money to the IRS, you clear out the liability.

2025-04-15 * "IRS" "Payment for 2024 tax return"
Liabilities:AccruedTaxes:Federal:Income 3,000.00 USD
Assets:Cash:Checking -3,000.00 USD

Your 2024 reports are correct, and your 2025 cash flow is correct. Perfect! This same pattern works in reverse for a refund—just use Assets:Tax:Receivable instead of the liability account.

Option B: Automate It with a Plugin

If you prefer to keep the payment in a single transaction, a fantastic community plugin called beancount_reds_plugins.effective_date can help. It lets you assign a different "effective date" to a single line item.

First, enable the plugin in your main Beancount file: plugin "beancount_reds_plugins.effective_date"

Now, you can write a single transaction. The plugin will automatically split it behind the scenes to make your reports accurate.

; One entry; the plugin handles the rest
2025-04-15 * "IRS" "Payment for 2024 tax return"
Assets:Cash:Checking -3,000.00 USD
Expenses:Taxes:Federal:IncomeTax:Payments 3,000.00 USD
effective_date: 2024-12-31

Here, the cash portion is recorded on April 15, 2025, but the expense portion is retroactively applied to December 31, 2024. It achieves the same result as Option A with a different workflow.


What About Sales Tax?

For most personal ledgers, sales tax is simple. If you're not claiming it back, just split it out as its own expense during a purchase.

2025-07-19 * "Local Grocery Store"
Expenses:Groceries 12.32 USD
Expenses:Taxes:Sales 1.28 USD
Assets:Cash:Checking -13.60 USD

This lets you easily track how much you're spending on sales tax over the year. If you run a business that deals with VAT, you'd use a more formal system with payable and receivable accounts, but the principle is the same.


Queries You'll Actually Run

The whole point of this structure is to make getting answers easy. Here are some BQL queries to see your tax picture.

1. What was my total federal income tax for 2024?

SELECT cost(sum(position))
WHERE account ~ "Expenses:Taxes:Federal:IncomeTax"
AND date >= 2024-01-01 AND date < 2025-01-01;

2. How did that total break down between withholding, payments, and refunds?

SELECT account, cost(sum(position))
WHERE account ~ "Expenses:Taxes:Federal:IncomeTax"
AND date >= 2024-01-01 AND date < 2025-01-01
GROUP BY account
ORDER BY account;

3. Do I have any outstanding tax debts or receivables? (Useful for checking your work!)

SELECT account, units(sum(position))
WHERE account ~ "Liabilities:AccruedTaxes" OR account ~ "Assets:Tax"
GROUP BY account
ORDER BY account;

If this query returns non-zero balances, it means you have accruals you haven't settled yet.


Quick FAQ

  • Do I really need per-year accounts like Expenses:Taxes:2024? Probably not. The accrual method (or the plugin) keeps a flat account structure clean and readable. Only create per-year accounts if you find it makes your specific queries easier to write.

  • Can Beancount calculate my taxes for me? Not directly, but it can prepare the data. Some advanced users write scripts to pipe BQL query results into tax calculation software, which is great for estimating your liability during the year.

  • Is this tax advice? No. This is a bookkeeping pattern for organizing your data. The accounting is sound, but you should always consult a tax professional for advice specific to your situation.


Your Drop-In Checklist

Ready to get started?

  1. Add the account skeleton to your Beancount file (and adapt names for your country).
  2. Book paychecks by starting with gross income and splitting out the tax postings.
  3. At year-end, accrue any true-ups for payments or refunds using a liability/asset account (or use the effective_date plugin).
  4. Track refunds as receivables and clear them when the cash arrives.
  5. Run the BQL queries above to verify your totals before you file.

Keep it boring, keep it consistent, and your tax season will finally feel like just another part of your financial story—not a mystery to be solved.

How Much to Set Aside for Small Business Taxes

· 6 min read
Mengjia Kong
Mengjia Kong
IRS Enrolled Agent

Running a small business is already a constant juggle of cash flow, suppliers, and customers—tax surprises shouldn’t be another bowling pin in the air. The good news: with a simple framework and a few Beancount tricks, you can translate “I hope the tax bill isn’t huge” into a predictable monthly transfer.

1. Know What You’re Really Paying For

2025-07-20-how-much-to-set-aside-for-small-business-taxes

Before you can set money aside, you need to know where it’s going. For most U.S. small businesses (especially sole proprietorships and partnerships), the total tax liability is a combination of several distinct obligations.

  • Federal Income Tax: This is a progressive tax, meaning the rate increases as your income does. For 2025, brackets go up to 37% for single incomes above $626,350 and married-filing-jointly (MFJ) incomes above $751,600.
  • Self-Employment (SE) Tax: This is the entrepreneur's version of FICA taxes (Social Security and Medicare) that W-2 employees pay. It’s a flat 15.3% on your first chunk of net earnings. The 12.4% Social Security portion stops once your profit hits the annual wage base, which is projected to be $176,100 in 2025. The remaining 2.9% for Medicare continues on all profits.
  • State & Local Income Tax: This varies wildly by location, ranging from 0% in states like Wyoming and Texas to over 13% in California's top bracket.
  • Quarterly Underpayment Penalties: The IRS wants its money throughout the year, not all at once. To avoid penalties, you generally must pre-pay at least 90% of your current year's tax liability or 100% of your previous year's tax bill (this threshold rises to 110% if your adjusted gross income, or AGI, is over $150,000).

Quick heuristic: Most U.S. solopreneurs who live in an average-tax state end up owing 25% - 30% of net profit once federal, SE, and state taxes are combined.

2. A Three-Step Estimate You Can Update Monthly

You don’t need complex software to get a handle on this. A simple, repeatable process is all it takes.

  1. Project Annual Profit: Look at your year-to-date performance and make a reasonable forecast for the full year. The basic formula is your friend: Projected Revenue - Projected Deductible Expenses = Projected Profit.
  2. Apply an Effective Tax Rate: Start with a reasonable percentage. If you have last year’s tax return, you can calculate your effective rate from that. If you're new to this, the 30% heuristic is a safe starting point.
  3. Divide by 12 (or 52): Take your total estimated annual tax and divide it by the number of pay periods you want to use. We recommend monthly. Move that amount into a dedicated tax-reserve bank account every month. If your cash flow is more volatile, a weekly transfer might feel more manageable.

3. Implement It in Beancount

Plain-text accounting makes this process transparent and auditable. Here’s how to manage your tax savings in Beancount.

First, create a routine transaction to move your monthly savings from your primary checking account to a separate, dedicated savings account for taxes.

; Reserve July's taxes
2025-07-31 * "Tax reserve transfer"
Assets:Bank:Checking -3000 USD
Assets:Bank:TaxReserve 3000 USD
Equity:Opening-Balances

When you make a quarterly estimated payment to the government, you record the actual liability. The payment comes directly from your reserve account.

; Record liability when you file the quarterly payment
2025-09-15 * "Q3 estimated tax payment"
Assets:Bank:TaxReserve -9000 USD
Liabilities:Taxes:Federal 6000 USD
Liabilities:Taxes:State 3000 USD

This simple system buys you three powerful advantages:

  • Immediate Visibility: Your Assets:Bank:TaxReserve balance always shows what’s already “spoken for.” You know at a glance that this cash isn't available for other business expenses.
  • Accurate Profit: Because the reserve is treated as a transfer between asset accounts, your Profit & Loss statement isn’t distorted. You only record the tax liability when you actually file and pay it.
  • Audit Trail: Every payment to the IRS or your state treasury ties back to a clearly tagged movement from your reserve account, creating a clean paper trail.

4. Fine-Tuning Your Percentage

The initial 25% - 30% estimate is a great start, but you should adjust it based on your specific business model.

  • High-Margin Consultants / Agencies: If you clear well above the Social Security wage base ($176,100), your effective tax rate will climb. A rate of 30% - 35% is likely more accurate.
  • Product Businesses with Heavy Deductions: If you have significant costs of goods sold (COGS), inventory, or other deductions, your net profit margin is lower. A rate of 20% - 25% may suffice. Use Form 1040-ES worksheets each quarter to confirm.
  • S-Corp Owners: Your situation is different. The "reasonable salary" you pay yourself is subject to standard payroll withholding (FICA and income taxes). Your distributions (profits paid out beyond salary) still require quarterly estimated payments, but often at a lower marginal rate since they aren't subject to SE tax.
  • Multi-State Sellers: If you have "nexus" (a significant business presence) in multiple states, you may owe income tax in each. This can stack your liabilities. For clarity, create separate liability accounts in Beancount, such as Liabilities:Taxes:State:CA and Liabilities:Taxes:State:NY.

5. Automate, Review, Repeat

A system only works if you use it. Make it effortless.

  • Automate: Link your main operating account to a high-yield savings account named something like "TaxReserve." Schedule an automatic transfer to occur right after you close your books each month.
  • Review: Re-forecast your annual profit quarterly. If Q2 sales blew past expectations, increase your monthly reserve amount immediately. Don't wait until January to discover you've under-saved.
  • Repeat: Keep key documents organized within your Beancount directory. Saving last year’s final tax return (document: "2024/Taxes/Form1040.pdf") gives you one-click context when discussing numbers with your CPA or planning for the next year.

Closing Thoughts

Tax bills feel random only when the set-aside process is. By baking a percentage-based reserve directly into your double-entry accounting flow, you trade anxiety for algebra—and Beancount makes the math (and the audit trail) trivial. Review your rate each quarter, keep Assets:Bank:TaxReserve funded, and April 15th turns back into just another day of business as usual.


Disclaimer: This article is for educational purposes only and isn’t tax advice. Always confirm numbers with a qualified professional for your jurisdiction and entity type.