We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Conversion Rates

The "conversion rate" is the percentage of users who complete a desired action, like signing up. If 100 people visit your homepage and 10 sign up, the conversion rate is 10%.

If only 5 of those signups submit a lesson, the "step conversion rate" from signup to lesson submission is 50%, but the "overall conversion rate" from homepage visit to lesson submission is only 5%.

Step Users Overall conversion Conversion from previous step
Homepage visit 100 100% -
Signup 10 10% 10%
Lesson submission 5 5% 50%

Assignment

SnackStack's growth team wants a simple, unordered check of how many users appear in one funnel step compared to another.

Complete the calculate_conversion_rate function. It accepts an events DataFrame (user_id and step columns) plus a from_step and a to_step, and returns the conversion rate between them as a float.