Open-Sourcing Our Zero-Dependency TypeScript 3-Statement Accounting Engine & 979-Formula SBA Excel Model (MIT)
Most financial model spreadsheets floating around the internet fail the single check every commercial bank underwriter runs in the first 60 seconds: does the Balance Sheet actually balance to $0.00 every month across 60 months?
When we built ProFormaPlan—a US small-business planning and 5-year financial modeling web app—we refused to let an LLM hallucinate P&L tables or plug arbitrary "miscellaneous" lines to force a balance sheet to tie. Instead, we wrote a deterministic, zero-dependency TypeScript accounting engine and a native-formula Excel workbook generator.
Today we open-sourced the core TypeScript underwriting modules, 24 US NAICS industry benchmark presets, unit test suite, and a full unlocked 8-tab, 979-formula .xlsx sample workbook under the MIT License:
GitHub Repository: https://github.com/proformaplan/sba-5yr-financial-model-excel
Direct .xlsx Release Download (v1.0.0): https://github.com/proformaplan/sba-5yr-financial-model-excel/releases/tag/v1.0.0
Why Deterministic 3-Statement Math Beats Prompted Spreadsheets
Ask a general-purpose chatbot to generate a 5-year business plan financial model and you almost always get three silent accounting bugs:
- Loan principal deducted on the Income Statement instead of separating interest expense (P&L) from principal reduction (Financing Cash Flow & Balance Sheet debt reduction).
- Accrual revenue treated as cash—ignoring Accounts Receivable (Net-30/60 billing lag), Inventory build, and Accounts Payable timing, which hides Month-4/Month-5 working-capital troughs.
- Disconnected Balance Sheets where Cash, Retained Earnings, Fixed Assets (net of accumulated depreciation), and Ending Debt drift apart by tens of thousands of dollars by Year 3.
Our open-source src/engine.ts runs a strict 60-month accounting loop from Month 0 (Opening Balance Sheet from Sources & Uses) through Month 60:
// Month-by-month indirect cash flow & Balance Sheet reconciliation: // Operating Cash Flow = Net Income + Depreciation - ΔAR - ΔInventory + ΔAP // Financing Cash Flow = -Principal Payment // Ending Cash = Beginning Cash + Operating CF + Financing CF // Balance Check = Total Assets - (Total Liabilities + Total Equity) === $0.00 Across all 24 US NAICS presets—from a $400K Full-Service Restaurant (NAICS 722511) to a $280K Regional Trucking Carrier (NAICS 484110) to a $550K Short-Term Rental portfolio (NAICS 721199)—the maximum balance-sheet variance across all 60 months is strictly $0.00.
What Is Inside the MIT Repo
Zero npm runtime dependencies—runs straight on Node 22.6+ or Node 24+ native TypeScript stripping:
git clone https://github.com/proformaplan/sba-5yr-financial-model-excel.git cd sba-5yr-financial-model-excel npm test -
src/engine.ts— 60-month integrated Income Statement, Indirect Cash Flow, Balance Sheet ($0.00tie-out), and SBA SOP 50 10 8.1 Scorecard -
src/presets.ts— 24 US NAICS small-business assumption presets -
src/sbaLoan.ts— Level-paymentPMTamortization, FY2027 SBA 7(a) upfront guarantee fee tiers, and minimum EBITDA required for 1.15x / 1.25x DSCR -
src/acquisition.ts— Business acquisition SDE -> CFADS waterfall, 10% equity injection check (including the SBA rule allowing a full-standby seller note for up to 5% of the 10% floor), and Year-1 Cash-on-Cash return -
src/breakeven.ts— Contribution margin, fixed OpEx + debt-service break-even, and Margin of Safety -
templates/sba-5yr-3-statement-financial-model-sample.xlsx— Unlocked 8-tab workbook with 979 live Excel formulas (=SUM,=PMT,=IPMT,=PPMT, cross-sheet references), zero macros, zero locked sheets; opens cleanly in Microsoft Excel, Google Sheets, and LibreOffice Calc.
Try the Live Web Calculators (No Login)
If you want to run the same TypeScript engine interactively in the browser before cloning:
- 5-Year 3-Statement Pro Forma Previewer (all 24 industries): https://www.proformaplan.com/financial-projections-template?utm_source=devto&utm_campaign=oss_launch
- SBA 7(a) DSCR Calculator: https://www.proformaplan.com/sba-dscr-calculator?utm_source=devto&utm_campaign=oss_launch
- SBA 7(a) Business Acquisition & Standby Seller Note Calculator: https://www.proformaplan.com/sba-business-acquisition-calculator?utm_source=devto&utm_campaign=oss_launch
- 12-Month AR/AP Cash Flow Trough Simulator: https://www.proformaplan.com/cash-flow-forecast-template?utm_source=devto&utm_campaign=oss_launch
Fork it, run npm test, inspect every formula in the sample .xlsx, or open an issue on GitHub if you want to see another US NAICS vertical added.
Disclaimer: Financial modeling software and illustrative US small-business benchmarks only—not a CPA, attorney, lender, or loan broker, and does not guarantee loan approval.