
How to Build a Margin Calculator With AI in One Prompt

Build Your Own Tools. No Developer Needed.

This is the second live demo from the October 14 roundtable. Three ordinary CSV exports in a folder become a one-page brief you can read on Monday morning.
1. Put the three CSV files in a folder on your computer
Export three reports from your CRM or books: leads, revenue, and expenses. Save them as weekly_leads.csv, weekly_revenue.csv, and weekly_expenses.csv. Put all three in one folder. The names do not have to be perfect, but keep them simple so the AI can find them.

2. In Claude Code, select that folder and paste the prompt
Open Claude Code, switch to the Code tab, and choose the folder that holds the three CSVs. Then paste this prompt.
In Grok Build, attach the three files or point at the folder if the tool supports it. Either works.
3. The brief appears as a page you can open
Claude Code writes an HTML file (or a markdown file) inside the folder. Open it. You get this week vs last week for revenue, expenses, new leads, and margin, plus a one-line takeaway and the top lead source. No spreadsheet required.

4. Iterate if it needs a change
If the first version is close but not right, paste a short note back. “Add the top lead source as a separate line.” Or “Flag the margin in red if expenses are higher than revenue.” Or “Use my actual column names.” The AI updates the same page. That back-and-forth is how the tool gets usable.
The same idea works for any tool you can describe
A weekly brief is one example. The pattern is the same for anything that starts as a form, a comparison, or a one-page report. Describe who uses it and what done looks like. Ask for the file. Open it. Paste notes back if it needs a change.
| Who | Tool | What it does |
|---|---|---|
| Trades / HVAC / service | Job quote calculator | Hours + materials + target margin → price + short email note |
| Realtor | Listing comparison sheet | Address, price, sqft, days on market → side-by-side |
| Consultant / professional services | Time & expense logger | Project, hours, rate, expenses → invoice total |
| Any owner | Weekly numbers brief | Drop CSV exports in a folder → one-page highlights |
| Parts or product business | Reorder alert | Stock levels, flag low items |
| Any | Invoice generator or expense tracker | Simple form that totals and formats what you need |
Pick one of those, or write your own in two sentences. The steps are the same.


