Build a Unit Economics Calculator for CAC, LTV, and Payback

Create a single-file unit economics calculator with interactive sliders, live CAC and LTV formulas, payback months, and a plain-language health verdict.

Text prompt for ChatGPT and Claude

You get: one complete HTML file in a single code block, then 3 short ideas to extend it.

The prompt

Prompt
Act as a senior front-end developer and financial tool designer. Build UnitPulse, a clean, single-file HTML Unit Economics Calculator for Customer Acquisition Cost (CAC), Lifetime Value (LTV), and Payback Months.

Core features and rules:
1. Interactive controls: Provide synchronized range sliders and number inputs for Monthly Marketing Spend ($), New Customers per Month, Average Monthly Revenue per Customer ($), Gross Margin (%), and Monthly Churn Rate (%). Do not use any HTML form tags.
2. Sample data and reset: Load realistic sample data on startup so all metrics display immediately, and include a visible Reset Sample button.
3. Live outputs and formula breakdown: Display CAC, Gross-Margin LTV, LTV-to-CAC Ratio, and Payback Months with clear units and sensible rounding. Include a short How This Is Calculated section showing the exact formulas without claiming any figure is an industry benchmark.
4. Plain-language verdict: Show a dynamic status card explaining customer acquisition health in plain English based on the LTV-to-CAC ratio and payback period.
5. Technical constraints: Use one self-contained HTML file with inline CSS and JavaScript wrapped in an IIFE. No external libraries, fonts, network calls, localStorage, or alert dialogs. Ensure readable contrast and responsive layout from 360px to 1280px.

Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.

Example output

One HTML file. Save it and open it in any browser.Open full screen (opens in a new tab)

Example: UnitPulse, an interactive unit economics calculator for CAC, LTV, and payback months.

Move any slider or type into the number boxes to see CAC, Gross-Margin LTV, LTV:CAC Ratio, and Payback Months update in real time. Try raising monthly churn or lowering gross margin to watch the plain-language health verdict shift, or click Reset Sample to restore the starting scenario.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Pre-filled sample numbers ensure the calculator is immediately useful on first load without requiring manual setup.
  • Synchronized sliders and number inputs let users explore scenarios quickly while still allowing exact figures.
  • Showing the exact math in a dedicated formula section builds trust and prevents confusion over how LTV is calculated.

Paste this prompt into ChatGPT, Claude, or Gemini, copy the generated HTML into a .html file, and open it in any browser—or preview it directly in Canvas or Artifacts.

Common edits

  • Add localStorage persistence so your team's last entered acquisition and margin numbers stay saved in the browser.
  • Include a CSV or JSON export button to download the current scenario and formula breakdown for pitch decks.

Reuse it: Use in a workflowTurn into a skillAdapt in the builder

Mini Apps & Tools

Build a Contractor Quote and Estimate Builder in HTML

A single-file contractor quote builder that separates labour and materials with adjustable markup, tax, deposit calculation, and a clean print view.

Mini Apps & Tools

Build a Startup Runway and Burn Rate Calculator in One HTML File

A self-contained startup runway and burn rate calculator with interactive sliders, scenario presets, and an SVG cash timeline.

Mini Apps & Tools

Build an Email Signature Generator With Three Layouts in HTML

Create a self-contained email signature builder with three switchable layouts, live preview, and inline-styled table HTML ready to copy.

Mini Apps & Tools

Build a Printable Freelance Invoice Generator with Tax and Totals in One HTML File

Creates a single-file invoice maker with editable line items, tax and discount handling, saved client details, and a print-ready layout you can save as PDF. It works offline and needs no server.

Mini Apps & Tools

Build a Mobile-First Cafe Menu Page With Dietary Filters

Create a thumb-friendly QR code cafe menu with instant dietary tag filters, category jump links, keyword search, and a table order tally.

Mini Apps & Tools

Build a Distributed Team Time-Zone Meeting Planner in One HTML File

A single-file time-zone meeting planner with a 24-hour overlap grid, fair working-hour highlights, and one-click copy of proposed slots.