Dev.to WebDev ๐Ÿ›  Dev ๐Ÿ‘ 0 ๐Ÿ“– 3 min read

Cost per lead lies: a 20-line calculator for real estate cost per qualified lead and cost per booking

Real estate marketing in India is usually priced and reported on cost per lead. That is the number every vendor quotes, and the one that tells a developer or broker the least. A lead that never picks up the phone costs

Real estate marketing in India is usually priced and reported on cost per lead. That is the number every vendor quotes, and the one that tells a developer or broker the least. A lead that never picks up the phone costs the same as one that books a site visit.

We built a small, dependency-free calculator that turns the numbers a sales team already has into the two numbers that matter: cost per qualified lead (CPQL) and media cost per booking. This post walks through the maths and the ~20 lines of JavaScript behind it.

The five inputs

  1. Monthly media spend (โ‚น), paid to Meta and Google
  2. Leads in the month (form fills or calls)
  3. Qualification rate (%): leads that meet your written qualification definition
  4. Qualified leads per booking, from your CRM history
  5. Earning per booking (โ‚น): commission, or the margin share you allow for marketing

The formulas

Output Formula
Cost per lead spend รท leads
Cost per qualified lead cost per lead รท qualification rate
Media cost per booking CPQL ร— qualified leads per booking
Bookings from this spend (leads ร— qualification rate) รท qualified leads per booking
Share of earning spent on media media cost per booking รท earning per booking

A worked example with illustrative inputs (not benchmarks): โ‚น60,000 spend, 100 leads, 30% qualified, 15 qualified leads per booking.

  • Cost per lead = โ‚น600
  • CPQL = โ‚น600 รท 0.30 = โ‚น2,000
  • Media cost per booking = โ‚น2,000 ร— 15 = โ‚น30,000
  • Bookings = (100 ร— 0.30) รท 15 = 2.0

If a booking earns โ‚น2,00,000, media is 15% of it. Halve the qualification rate and the same spend costs โ‚น60,000 per booking, which shows why qualification moves the economics more than shaving the CPL.

The code

Everything recalculates on every input event; nothing is sent anywhere.

const $ = (id) => document.getElementById(id);
const inr = (n) => (isFinite(n) && n > 0)
  ? 'โ‚น' + Math.round(n).toLocaleString('en-IN')
  : 'โ€“';

function run() {
  const spend = +$('spend').value, leads = +$('leads').value;
  const q = +$('qual').value / 100, perBooking = +$('perbook').value;
  const earn = +$('earn').value;

  const cpl = spend / leads;
  const cpql = cpl / q;
  const cpb = cpql * perBooking;
  const bookings = (leads * q) / perBooking;
  const share = earn > 0 ? cpb / earn : NaN;

  $('o-cpl').textContent = inr(cpl);
  $('o-cpql').textContent = inr(cpql);
  $('o-cpb').textContent = inr(cpb);
  $('o-books').textContent = isFinite(bookings) ? bookings.toFixed(1) : 'โ€“';
  $('o-share').textContent = isFinite(share) ? Math.round(share * 100) + '%' : 'โ€“';
}

['spend', 'leads', 'qual', 'perbook', 'earn']
  .forEach((id) => $(id).addEventListener('input', run));
run();

Two small details worth copying:

  • toLocaleString('en-IN') gives Indian digit grouping (โ‚น2,00,000), which is what Indian sales teams read.
  • Guarding with isFinite keeps divide-by-zero states showing a dash instead of Infinity or NaN.

Why client-side

Lead numbers are commercially sensitive. A calculator that runs entirely in the browser can be shared with a developer's sales head without anyone worrying where the numbers go. It also means the tool is a single static file that loads instantly on mobile.

What to do with the output

The calculator doesn't tell you what "good" is; that depends on your project, price band and catchment. Use your own CRM numbers. If media takes more than about half of what a booking earns, the fix is usually qualification and speed to lead, not more spend.

The full method is in our guides on cost per qualified lead for developers and lead cost for brokers.

QDnCo runs research-led real estate marketing for developers, brokers and channel partners in India and Dubai: https://qdnco.com/

๐Ÿ“ฐ Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.