function calculateConversion() {
// Get Inputs
var totalLeads = parseFloat(document.getElementById('totalLeads').value);
var qualifiedLeads = parseFloat(document.getElementById('qualifiedLeads').value);
var closedDeals = parseFloat(document.getElementById('closedDeals').value);
var dealValue = parseFloat(document.getElementById('dealValue').value);
// Validation
if (isNaN(totalLeads) || totalLeads totalLeads) {
alert("Qualified leads cannot be higher than total leads.");
return;
}
if (closedDeals > qualifiedLeads && qualifiedLeads > 0) {
alert("Closed deals cannot be higher than qualified leads.");
return;
}
// Calculations
var overallConversion = (closedDeals / totalLeads) * 100;
// Visitor to Qualified (Top -> Middle)
var topConversion = (qualifiedLeads / totalLeads) * 100;
// Qualified to Closed (Middle -> Bottom)
// Avoid division by zero
var bottomConversion = 0;
if (qualifiedLeads > 0) {
bottomConversion = (closedDeals / qualifiedLeads) * 100;
}
var totalRevenue = closedDeals * dealValue;
// Display Results
document.getElementById('overallRateDisplay').innerText = overallConversion.toFixed(2) + "%";
document.getElementById('topRateDisplay').innerText = topConversion.toFixed(2) + "%";
document.getElementById('bottomRateDisplay').innerText = bottomConversion.toFixed(2) + "%";
// Format Currency
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
});
document.getElementById('revenueDisplay').innerText = formatter.format(totalRevenue);
// Funnel Analysis Text
document.getElementById('stage1Analysis').innerText =
"Funnel Step 1: " + topConversion.toFixed(2) + "% of visitors became qualified leads.";
document.getElementById('stage2Analysis').innerText =
"Funnel Step 2: " + bottomConversion.toFixed(2) + "% of qualified leads converted to sales.";
document.getElementById('result-container').style.display = "block";
}
How to Calculate Sales Funnel Conversion Rate
Understanding your sales funnel is critical for optimizing revenue and marketing efficiency. The sales funnel conversion rate measures the percentage of potential customers who enter your funnel and successfully complete a purchase. By tracking this metric at various stages, you can identify bottlenecks where you are losing potential revenue.
The Core Formula
To calculate your overall sales funnel conversion rate, you simply divide the number of total sales by the number of total leads (or visitors) who entered the funnel, then multiply by 100.
Conversion Rate = (Total Sales / Total Leads) × 100
For example, if you had 5,000 visitors to your landing page and generated 100 sales, your conversion rate would be:
(100 / 5,000) × 100 = 2.00%
Breaking Down the Funnel Stages
While the overall rate is important, a granular analysis provides better insights. Most sales funnels are broken down into three main metrics:
Top of Funnel (Visitor to Lead): Measures how effectively your marketing attracts qualified interest. High traffic but low leads suggests your messaging or targeting is off.
Middle of Funnel (Lead to Opportunity): Measures lead quality and the effectiveness of your nurturing campaigns.
Bottom of Funnel (Opportunity to Sale): Measures the effectiveness of your sales team or checkout process in closing the deal.
Why Track Revenue per Lead?
This calculator also includes an "Average Deal Value" input. This allows you to calculate the gross revenue generated by the funnel. More importantly, it helps you understand how much you can afford to spend to acquire a customer (CAC). If your average deal value is $250 and your conversion rate is 2%, your revenue per visitor is $5. This means if you spend more than $5 in ads to get one visitor, you are losing money.
Optimizing Your Conversion Rates
To improve your sales funnel numbers, consider these strategies:
A/B Testing: Test different headlines and calls-to-action (CTA) at the top of the funnel.
Reduce Friction: Simplify forms and checkout processes to improve the bottom-of-the-funnel rate.
Lead Scoring: Focus your sales team's energy only on "Qualified Leads" to improve the close rate.