import React, { useState, useMemo } from 'react';
import { TrendingUp, Users, DollarSign, Percent, ArrowRight } from 'lucide-react';
const App = () => {
// State for inputs
const [attendees, setAttendees] = useState(300);
const [convRate, setConvRate] = useState(5);
const [avgSale, setAvgSale] = useState(500);
// Constants
const COST_PER_ATTENDEE = 0.30;
// Memoized Calculations
const calculations = useMemo(() => {
const cost = attendees * COST_PER_ATTENDEE;
const customers = Math.floor(attendees * (convRate / 100));
const grossRevenue = customers * avgSale;
const netProfit = grossRevenue - cost;
const roi = cost > 0 ? (grossRevenue / cost).toFixed(1) : 0;
return {
cost,
customers,
grossRevenue,
netProfit,
roi
};
}, [attendees, convRate, avgSale]);
// Formatting helpers
const formatCurrency = (val) =>
new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: 0 }).format(val);
const formatPreciseCurrency = (val) =>
new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(val);
const formatShort = (n) => {
if (n >= 1000000) return `$${(n / 1000000).toFixed(1)}M`;
if (n >= 1000) return `$${(n / 1000).toFixed(1)}K`;
return `$${Math.round(n)}`;
};
return (
ProProfs ROI Calculator
Estimate your webinar revenue and profitability
{attendees.toLocaleString()}
setAttendees(parseInt(e.target.value))}
className="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-600"
/>
{/* Conversion Rate Slider */}
{convRate}%
setConvRate(parseFloat(e.target.value))}
className="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-600"
/>
{/* Avg Sale Value Slider */}
{formatCurrency(avgSale)}
setAvgSale(parseInt(e.target.value))}
className="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-600"
/>
{/* Cost Highlight */}
{formatPreciseCurrency(calculations.cost)}
($0.30 per attendee base rate)
{/* Right Column: Results */}
Gross Revenue
{formatCurrency(calculations.grossRevenue)}
{/* Mini Stats */}
ROI Multiple
{calculations.roi}x
Net Profit
{formatCurrency(calculations.netProfit)}
{/* Detailed Breakdown */}
| New Customers | {calculations.customers} |
| Gross Revenue | {formatCurrency(calculations.grossRevenue)} |
| Platform Cost | -{formatPreciseCurrency(calculations.cost)} |
| Net Income | {formatCurrency(calculations.netProfit)} |
{/* CTA Section */}
Ready to make this real?
Start your first webinar and potentially make {formatShort(calculations.grossRevenue)} this month.
);
};
export default App;
Want to host a webinar for free?
Use WebinarNinja to teach, improve marketing, and grow your sales.




