How to calculate Website Conversion Rate
Website conversion rate is the share of visits or visitors that complete a goal such as signing up or buying.
Formula
Conversion rate = conversions ÷ visits (or visitors) × 100SQL query
This example assumes: sessions(id, visitor_id, started_at, source), conversions(session_id, goal). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.
SELECT s.source,
COUNT(DISTINCT s.id) AS sessions,
COUNT(DISTINCT c.session_id) AS converting_sessions,
COUNT(DISTINCT c.session_id) * 100.0
/ NULLIF(COUNT(DISTINCT s.id), 0) AS conversion_pct
FROM sessions s
LEFT JOIN conversions c ON c.session_id = s.id AND c.goal = 'signup'
WHERE s.started_at >= CURRENT_DATE - 30
GROUP BY s.source
ORDER BY conversion_pct DESC;Common mistakes that make Website Conversion Rate wrong
- Sessions and unique visitors give different rates; pick one and say which.
- Counting a conversion per page view instead of per session inflates it.
- Bot traffic in the denominator depresses the rate.
Ask for Website Conversion Rate in plain English
Instead of writing the query yourself, you can type the question. SchemaChat turns it into SQL against your connected database or uploaded file, runs it, and shows the SQL and the figures it used so you can check the answer before you share it. It does not replace your judgement about the definition: check that the query matches the formula your business uses.
- What is our signup conversion rate by traffic source?
- How did website conversion change after the pricing page update?