As a CPA who’s seen too many nonprofit audit findings, I need to talk about something that keeps me up at night: restricted vs. unrestricted fund commingling. It’s the #1 grant accounting mistake, and I just had a client face a brutal audit because of it.
The Problem
Last month, I got a call from a nonprofit executive director in tears. Their annual audit flagged $40,000 in commingled funds—restricted grant money from a major foundation had been used to cover unrestricted operating expenses. Even though it was accidental (bookkeeper didn’t understand the restriction), the consequences were severe:
- Foundation demanded full explanation and corrective action plan
- Audit opinion was qualified (red flag for future funders)
- Two board members resigned over “financial mismanagement” concerns
- They’re now on every funder’s watch list
According to nonprofit accounting experts, even accidental commingling can undermine donor confidence and create audit findings that follow your organization for years. Under ASC 958 and UPMIFA, spending restricted funds outside the donor’s intent violates nonprofit accounting standards.
The Beancount Technical Solution
Here’s where I think Beancount provides an elegant solution through its account hierarchy. Instead of relying on fund codes or class tracking (like QuickBooks), the double-entry system structurally prevents commingling.
Consider this account structure:
Assets:BankAccounts:Checking:Unrestricted
Assets:BankAccounts:Checking:Restricted:GrantFoundationA
Assets:BankAccounts:Checking:Restricted:GrantFoundationB
Expenses:Programs:Unrestricted
Expenses:Programs:Restricted:GrantFoundationA
Expenses:Programs:Restricted:GrantFoundationB
Now, when you record a transaction:
2026-03-15 * "Program supplies purchased with Foundation A grant"
Expenses:Programs:Restricted:GrantFoundationA 1200.00 USD
Assets:BankAccounts:Checking:Restricted:GrantFoundationA
The double-entry bookkeeping enforces that money from GrantFoundationA can ONLY be spent from the corresponding restricted expense account. If you try to spend restricted money on unrestricted expenses, the transaction won’t balance—Beancount will reject it.
My Questions for the Community
I’m exploring whether this approach actually works in production, especially for nonprofits managing 5-20 active grants simultaneously. Here’s what I’m trying to figure out:
1. Account Structure at Scale: For nonprofits with many grants, should each grant have its own bank account (true separation) or can we rely on the account hierarchy alone? What happens when a grant allows cost-sharing across programs?
2. Technical Enforcement: Can we write validation scripts that automatically flag transactions attempting to move restricted funds to unrestricted accounts? Something like a plugin that checks for cross-restriction transfers and raises errors?
3. Board Reporting: Non-technical board members and auditors are used to QuickBooks reports showing fund balances. How do you communicate Beancount’s structure to them? Do you generate “traditional-looking” fund balance reports from BQL queries?
4. Audit Readiness: When an auditor asks “prove you didn’t commingle Grant B funds with operational funds,” what does that proof look like in Beancount? Can we generate a complete transaction history for a specific grant with balance assertions confirming the math?
The Stakes
The nonprofit sector handles billions in restricted grant funding annually. Compliance is non-negotiable—non-compliance can lead to lawsuits from donors, IRS fines, loss of tax-exempt status, and severe reputational damage.
If Beancount can provide a better technical solution to prevent commingling—one that’s structurally sound rather than relying on bookkeeper discipline—that’s a huge value proposition for nonprofits.
Has anyone built this in production? Are there templates, validation scripts, or reporting workflows you’re willing to share? I’m particularly interested in hearing from anyone who’s successfully taken a nonprofit through an audit using Beancount for grant accounting.
Sources: Managing Restricted Funds - Propel Nonprofits, Grant Compliance and Fund Management, Restricted Funds Best Practices