Monthly reporting is the tax every finance team pays. Pull data from three systems, paste into a template, write the same commentary with slightly different numbers, format it, send it. Every month.
Claude turns this into a 15-minute task — or an automated one.
Real example
“I asked Claude Code to generate formatted HTML reports instead of just dumping numbers into a terminal. Now I get polished, client-ready reports I can email directly.”
— Laura Roeder
Founder who automated financial reporting with Claude Code
Two Approaches
You have two paths depending on your comfort level. Pick your product to see the relevant workflow:
Chat approach: Upload your data each month, get a narrative report you copy into your template. Takes 15 minutes per month. No setup required — just paste data and get results.
Chat Approach: Data to Narrative
Upload your monthly financials and get board-ready commentary.
I'm uploading our monthly P&L data. Write a financial narrative report for ${month} covering:
1. **Revenue Summary** — Total revenue, MoM and YoY change, breakdown by segment. Call out anything that moved more than 10%.
2. **Gross Margin Analysis** — Gross profit and margin percentage. If margin changed more than 1 point, explain the likely driver.
3. **Operating Expenses** — Total opex, breakdown by department (Engineering, Sales, Marketing, G&A, CS). Highlight any department that's over budget by more than 5%.
4. **EBITDA** — EBITDA and EBITDA margin. Compare to plan and prior year.
5. **Cash Position** — Ending cash, burn rate, runway in months.
6. **Key Callouts** — 3-5 bullet points a board member needs to know. Focus on changes, not static metrics. "Revenue grew 12% MoM driven by enterprise expansion" not "Revenue was $1.2M."
Tone: concise, factual, no hedging. Use specific numbers. Format for a board deck — short paragraphs, bold key figures.Pro Tip
Upload both the current month and prior month data. Claude does much better comparative analysis when it can see the actual prior period numbers rather than you describing them in the prompt.
Adding Budget Comparison
Layer in budget data for variance analysis.
I'm uploading two files:
1. Actual P&L for ${month}
2. Budget/plan for ${month}
For each major line item, write a one-line variance explanation:
- Show the actual, budget, and variance (both $ and %)
- For variances over ${threshold}%, write a brief explanation of the likely cause
- Flag anything that needs management attention
Format as a table:
| Line Item | Actual | Budget | Variance ($) | Variance (%) | Commentary |
Then write a 3-paragraph executive summary focusing on the most important variances. What's working, what's off-track, and what actions are recommended.Code Approach: Automated HTML Reports
This is where it gets powerful. Claude Code builds a script that reads your data files and generates a polished HTML report — formatted, color-coded, and ready to email.
Build a Python script that generates a monthly financial report as a formatted HTML file.
INPUT:
- Read a CSV file at ${dataPath} with columns: date, category, subcategory, actual_amount, budget_amount
- Read prior month data from the same file (filter by date)
OUTPUT — an HTML file with:
1. HEADER SECTION
- Company name: ${companyName}
- Report period
- Generated date
2. REVENUE TABLE
- Filter category="Revenue"
- Show each subcategory, actual, budget, variance, variance %
- Color code: green if over budget, red if under budget by >5%
- Bold the total row
3. EXPENSE TABLE
- Same format as revenue
- Color code: green if UNDER budget, red if OVER budget by >5%
4. SUMMARY METRICS (styled as cards/boxes)
- Total Revenue (with MoM change arrow)
- Gross Margin %
- EBITDA
- Cash Burn Rate
5. TREND CHARTS
- Use a simple charting library (matplotlib → embedded PNG, or Chart.js inline)
- Revenue trend (last 6 months)
- EBITDA trend (last 6 months)
STYLING:
- Clean, professional CSS (inline for email compatibility)
- Responsive layout
- Print-friendly (no dark backgrounds)
- Font: system font stack
Save the output as monthly-report-YYYY-MM.html in the same directory as the data file.Terminal output: raw numbers dumped to stdout. You copy them into a Google Doc, format manually, add commentary, and send. Takes 2 hours.
Multi-Entity Reporting
If you run multiple business units or entities, Claude handles the consolidation.
I have monthly P&L data for ${entityCount} business units in separate CSV files. Build a consolidated report that:
1. Reads each entity's CSV file
2. Generates an individual summary for each entity (revenue, COGS, gross profit, opex, EBITDA)
3. Creates a consolidated view that sums all entities
4. Eliminates intercompany transactions (any line item tagged "intercompany" in the subcategory column)
5. Shows each entity's contribution as a percentage of consolidated revenue
Output as a single HTML file with:
- A navigation bar at the top linking to each entity section
- Individual entity summaries
- Consolidated summary at the bottom
- A simple bar chart showing revenue by entityKPI Dashboard Generation
Beyond the P&L, generate a KPI dashboard from operational data.
Generate a KPI dashboard HTML report from our metrics CSV. The CSV has columns: date, metric_name, metric_value. Metrics to display (with formatting): GROWTH METRICS (green header): - MRR → currency format, show MoM growth % - ARR → currency format - New customers → integer - Net revenue retention → percentage, highlight red if under 100% EFFICIENCY METRICS (blue header): - CAC → currency format - LTV → currency format - LTV:CAC ratio → decimal, highlight green if over 3.0, yellow if 2-3, red if under 2 - Payback period → months - Burn multiple → decimal, highlight green if under 2, red if over 3 ENGAGEMENT METRICS (purple header): - DAU/MAU ratio → percentage - Logo churn → percentage, highlight red if over 2% - Revenue churn → percentage For each metric, show: - Current month value - Prior month value - MoM change (arrow up/down + percentage) - Sparkline or mini-trend for last 6 months Layout: card grid, 3 columns, responsive. Include a "last updated" timestamp.
Scheduling the Automation
Once you have a working report script, make it run automatically.
Build the report script
Use the prompts above to create a Python script that reads your data and generates the HTML report.
Test with real data
Run it against your actual financial data. Fix any formatting issues or calculation errors.
Set up data export
Configure your accounting system (QBO, Xero, etc.) to export a CSV on a schedule, or use their API.
Add a cron job or scheduler
Ask Claude Code to set up a monthly cron job, GitHub Action, or simple scheduler that runs the script on the 5th of each month.
Email delivery
Ask Claude Code to add email sending via SMTP or an API like SendGrid. The HTML report becomes the email body.
Warning
Don't over-automate on day one. Get the report generation working first. Run it manually for 2-3 months. Once you trust the output, then add scheduling and email delivery. Automation you don't trust is worse than no automation.
Common Refinements
After the first version, you'll want to tweak. These are the most common follow-ups:
Scenario
The report looks good but your CEO wants the executive summary in bullet points, not paragraphs, and wants red/yellow/green status indicators next to each metric.
Scenario
Your board wants a one-page PDF, not an HTML file. They want to print it.
What Makes This Different from a Spreadsheet
The generated HTML report is not a replacement for your financial model — it's the presentation layer. Your source of truth stays in your accounting system or spreadsheet. Claude Code reads the data and generates the report.
This separation matters. Your model stays auditable. Your report stays pretty. Neither compromises for the other.