๐ Live demo: https://ayinde225.github.io/financial-statement-analyzer/
Enter or upload an income statement and balance sheet, and instantly get the standard financial ratios โ liquidity, profitability, leverage, and efficiency โ each rated against rule-of-thumb benchmarks, plus a ranked list of plain-English insights (liquidity risk, leverage, thin interest coverage, strong returns, and more).
A natural spin-off of my full-stack finance work: the domain analysis I know, turned into a tool.
Built with React + Vite. The ratio and insight engines are written from first principles and fully unit-tested.
- Three ways to get data in: type it, upload a CSV, or load a sample company
- Standard ratios, grouped and rated:
- Liquidity โ current, quick, cash
- Profitability โ gross / operating / net margin, ROA, ROE
- Leverage โ debt-to-equity, debt ratio, interest coverage
- Efficiency โ asset & inventory turnover, days sales outstanding (informational)
- Insight engine โ ranked observations by severity (critical โ info)
- Derived subtotals (gross profit, EBIT) computed live so inputs can't contradict themselves
- Robust CSV import โ case-insensitive label matching, common aliases, handles
$, commas, and(parentheses)negatives - Divide-by-zero safe, responsive, dark UI
| Ratio | Formula | Rule of thumb |
|---|---|---|
| Current ratio | Current assets รท current liabilities | โฅ 1.5 healthy |
| Quick ratio | (Current assets โ inventory) รท current liabilities | โฅ 1.0 healthy |
| Net margin | Net income รท revenue | โฅ 10% strong |
| Return on equity | Net income รท equity | โฅ 15% strong |
| Debt-to-equity | Total liabilities รท equity | โค 1.0 conservative |
| Interest coverage | EBIT รท interest expense | โฅ 3ร safe |
Thresholds are general guides โ real analysis is always industry-relative.
npm install npm run dev # start the dev server npm run build # production build npm test # run the unit tests
src/
lib/
model.js # statement model + derived subtotals (gross profit, EBIT)
ratios.js # pure ratio engine with rating logic
ratios.test.js
insights.js # rule-based insight generation, ranked by severity
insights.test.js
parseCsv.js # dependency-free CSV import + label matching
format.js # money / ratio formatting
sampleData.js # sample company + CSV template
components/
StatementInput.jsx # data entry + import controls
RatioGrid.jsx # grouped, rated ratio cards
Insights.jsx # ranked insight list
App.jsx
The finance logic is covered by unit tests โ ratio values and ratings against a known company, divide-by-zero safety, and the insight engine's severity rules:
npm testA finance-meets-code project โ the domain I know, expressed in software.