Перейти до основного вмісту

2 дописи з тегом "personal finance"

Переглянути всі теги

Recording Taxes in Beancount (The Pragmatic Way)

· 8 хвилин читання
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.

Бізнес-облік vs Особистий облік: Чітке розмежування з Beancount

· 5 хвилин читання
Mike Thrift
Mike Thrift
Marketing Manager

Успішна компанія та здоровий гаманець мають одну спільну рису: межі.

Для будь-якого власника бізнесу, від фрілансера-одинака до засновника стартапу, що розвивається, однією з найважливіших фінансових дисциплін є суворе розділення бізнес-фінансів та особистих фінансів. Змішування коштів — використання вашого бізнес-рахунку для покупок продуктів або оплата постачальника з вашого особистого рахунку — створює хаотичну, непрозору фінансову картину. Це не тільки привертає увагу податкових органів, але й позбавляє вас чіткого розуміння реальної ефективності вашої компанії.

2023-08-12-business-vs-personal-bookkeeping-with-beancount

На щастя, система простого текстового обліку, така як Beancount, надає ідеальну основу для забезпечення цих важливих меж безпосередньо у вашій бухгалтерській книзі.

Чому розділення важливе

Нерозділення ваших фінансів — це не просто погана звичка; це несе значні ризики та приховує цінну бізнес-інформацію.

  • Чіткість для ДПС: ДПС не просто пропонує вам мати окремі банківські рахунки; вони наполегливо рекомендують це. Коли бізнес-кошти та особисті кошти змішані, важко довести, які витрати є законними бізнес-витратами. Ця неоднозначність може призвести до питань та ускладнень, яких краще уникати.
  • Ризик аудиту: Змішування транзакцій є серйозним сигналом для аудиторів. Якщо ваші книги — це заплутана суміш особистої та бізнес-діяльності, ви ризикуєте тим, що ваші законні відрахування будуть відхилені або навіть зіткнетеся зі штрафами. Чиста, окрема бухгалтерська книга демонструє професіоналізм та робить будь-який потенційний аудит більш плавним та менш стресовим.
  • Чіткіше розуміння: Як ви можете знати свою справжню норму прибутку, якщо грошовий потік вашого бізнесу затьмарений особистими витратами? Окрема бізнес-бухгалтерська книга дає вам нефільтрований погляд на фінансове здоров'я вашої компанії. Ви можете точно відстежувати доходи, аналізувати витрати та розраховувати податкові зобов'язання без "шуму" вашого особистого фінансового життя.

Ключові відмінності з першого погляду

Мета, правила та структура бізнес-обліку та особистого обліку принципово відрізняються. Розуміння цих відмінностей є ключем до ведення точного обліку.

ОбластьБізнес-облікОсобистий облік
МетаВідстеження доходів, витрат, активів та зобов'язань для прийняття податкових та рішень щодо зростанняУправління домашнім бюджетом та цілями заощаджень
Податкові правилаПовинні відповідати Додатку C, 1120‑S або 1065; суворі стандарти відрахуваньКілька формальних вимог, окрім базового обліку
РахункиВласний капітал, кредиторська заборгованість, дебіторська заборгованість, податок з продажів, заробітна платаРозрахунковий рахунок, ощадний рахунок, інвестиції, кредити
Оплата власникаЗарплата (W‑2) або виплата власника через власний капіталN/A — особисті зняття коштів фінансують витрати на проживання

Чотириетапний план Beancount

Beancount спрощує встановлення міцної стіни між вашими двома фінансовими світами. Ось практичний робочий процес, щоб зробити це правильно.

• 1 — Відкрийте окремі рахунки

Перш ніж ви навіть напишете свій перший запис Beancount, відкрийте окремий бізнес-розрахунковий рахунок та бізнес-кредитну картку. Це фізичне розділення є основою чистого обліку. Після цього відобразіть цю структуру у своїй бухгалтерській книзі Beancount.

2025-07-23 open Assets:Bank:Business   USD
2025-07-23 open Assets:Bank:Personal USD

Ця проста схема гарантує, що кожна транзакція може бути чітко віднесена до ваших бізнес-фінансів або особистих фінансів з моменту її виникнення.

• 2 — Записуйте внески та зняття власника

Як власник, ви будете переміщувати гроші між вашими особистими коштами та бізнесом. Це не доходи чи витрати. Натомість вони відстежуються через рахунок власного капіталу.

  • Внесок: Коли ви вкладаєте власні гроші у бізнес, щоб розпочати його або покрити дефіцит.
  • Зняття: Коли ви забираєте гроші з бізнесу для особистого користування (саме так багато індивідуальних підприємців "платять" собі).
; Внесення капіталу для запуску бізнесу
2025-07-23 * "Внесок власника"
Assets:Bank:Business 10,000.00 USD
Equity:Owner:Contrib

; Зняття грошей для особистих витрат на проживання
2025-08-05 * "Зняття власника на оренду"
Equity:Owner:Draw 2,500.00 USD
Assets:Bank:Business

Записуючи їх як транзакції з власним капіталом, ви гарантуєте, що вони не завищують ваші бізнес-витрати та не зменшують ваш заявлений прибуток.

• 3 — Швидко обробляйте змішані квитанції

Помилки трапляються. Ви можете випадково використати свою бізнес-картку для оплати особистої вечері. Ключ у тому, щоб негайно виправити це у своїй бухгалтерській книзі. Не видаляйте транзакцію; перекласифікуйте її як зняття власника.

2025-08-07 * "Особисті покупки продуктів на бізнес-картці"
Equity:Owner:Draw 72.35 USD
Assets:Bank:Business

Цей запис правильно відображає, що бізнес-кошти були використані для особистих витрат, розглядаючи їх як гроші, які ви забрали з компанії. Це запобігає випадковому заявлению невідрахованих особистих витрат у ваших податках.

• 4 — Звіряйте та переглядайте за графіком

Послідовність — ваша найкраща захист від хаотичного обліку. Виділіть час щотижня або щомісяця для звіряння ваших бізнес-рахунків. Використовуйте інструменти Beancount, щоб переконатися, що ваша бухгалтерська книга відповідає вашим банківським випискам, та переглянути ефективність вашої компанії.

# Перевірте баланс вашого бізнес-банку з вашою випискою
bean-balance books.bean "Assets:Bank:Business"

# Створіть звіт про доходи, щоб переглянути прибутковість
bean-report books.bean income_statement -e 2025-08-31

Ця звичка регулярного перегляду задовольняє вимоги ДПС щодо ведення обліку та тримає вас в курсі фінансового стану вашого бізнесу.

Податкові міркування

  • Очікувані податки: Щоб уникнути болісного податкового рахунку, ставтеся до своїх майбутніх податків як до поточних бізнес-витрат. Створіть рахунки зобов'язань (Liabilities:Tax:Federal, Liabilities:Tax:State) та регулярно переміщуйте певний відсоток кожного депозиту на них. Коли настає час квартальних платежів, готівка вже чекає.
  • Невідраховані особисті витрати: Пам'ятайте правило ДПС: бізнес-витрати повинні бути "звичайними та необхідними" для вашої роботи. Ваші особисті обіди, витрати на проїзд та небізнес-передплати не кваліфікуються та повинні бути повністю виключені з звіту про прибутки та збитки вашого бізнесу.

Список швидкого старту

  • Відкрийте банківські рахунки та кредитні картки лише для бізнесу.
  • Створіть план рахунків Beancount з Assets:Bank:Business, Equity:Owner:Contrib та Equity:Owner:Draw.
  • Визначтеся з вашою основою обліку (касовий метод або метод нарахування) та зазначте це у ваших options Beancount.
  • Негайно позначайте будь-які випадкові особисті витрати на бізнес-картках як Equity:Owner:Draw.
  • Звіряйте щотижня; створюйте резервні копії вашого файлу .bean у приватному віддаленому репозиторії Git.
  • Переглядайте звіт про доходи, баланс та звіти про рух грошових коштів щомісяця.

Висновок: Окремі гроші, окремі бухгалтерські книги. Beancount робить стіну між вашим бізнесом та особистими фінансами явною — та контрольованою версіями — щоб ваш бізнес був готовий до аудиту, а ваша звичка пити лате залишалася нічиєю справою, крім вашої. Щасливого ведення обліку!