6 min read

How to Calculate Churn Rate in Amplitude

Your churn rate is often the first metric to drop when something's wrong—but most teams calculate it manually or miss silent cancellations. Amplitude gives you built-in tools to measure both explicit churn (subscription canceled) and implicit churn (user goes inactive). Here's how to set it up.

Define Your Churn and Track It

Before you measure churn, decide what it means for your product.

Choose Your Churn Definition

Explicit churn happens when a user cancels their subscription. Implicit churn is silence—they just stop using your product. Most SaaS products track both. Your definition drives your entire measurement strategy.

javascript
// Track explicit churn from your app
amplitude.track('subscription_cancelled', {
  'user_id': 'user_123',
  'subscription_length_days': 365,
  'cancellation_reason': 'price_too_high'
});
Log cancellation events as they happen in your billing system

Set Your Observation Window

For implicit churn, decide how long a user can be inactive before you call them churned. For monthly subscriptions, 30 days is standard. For annual subscriptions, try 90 days. This window matters because it changes your churn percentage.

javascript
// Track meaningful usage events to detect active users
amplitude.track('content_viewed', {
  'content_type': 'report',
  'content_id': 'weekly_dashboard'
});

// Or any key action in your product
amplitude.track('query_executed', {
  'query_complexity': 'high'
});
Whatever your users should do regularly, track it as an event

Add Churn Status to User Properties

Set a churn_status user property when you know someone has churned. This makes them easy to segment later without complex queries.

javascript
// When subscription cancels
amplitude.setUserProperties({
  'churn_status': 'churned',
  'churn_date': new Date().toISOString(),
  'churn_cohort': 'month_1'
});
Use user properties for quick filtering and segmentation
Watch out: If you only track explicit churn (cancellations), you'll miss power users who just stopped using the product and eventually let their subscription expire silently. Track both.

Measure Churn with Amplitude's Retention Chart

Amplitude calculates retention automatically. Your churn rate is just 100 minus retention.

Open the Retention Chart

In Amplitude, navigate to Events > Retention. This built-in chart shows you what percentage of users from each cohort come back. Retention is the inverse of churn—if 80% return, you have a 20% churn rate.

javascript
// The Retention chart works on your event data automatically.
// No SDK code needed here—just navigate to Events > Retention.
// But make sure you're tracking the right events from your app:

amplitude.track('feature_used', {
  'feature_name': 'dashboard',
  'time_spent_seconds': 120
});
Amplitude calculates retention from events you're already tracking

Configure Your Retention Parameters

Set your Initial Event (when users enter the cohort, like sign_up), your Retention Event (what counts as 'didn't churn', like login), and your Time Period (e.g., 30 days, 90 days). Amplitude shows retention grouped by day, week, or month.

javascript
// Make sure these core events are tracked consistently:

// Initial event - cohort entry
amplitude.track('sign_up', {
  'signup_date': new Date(),
  'plan': 'pro'
});

// Retention event - proof of engagement
amplitude.track('login', {
  'login_method': 'sso'
});

// Optional: subscription event
amplitude.track('subscription_purchased', {
  'subscription_type': 'annual',
  'mrr': 99
});
Track signup, login, and subscription events—Retention uses these

Interpret the Curve

Read the retention curve left-to-right. Each row is a cohort of users from a specific day or week. The percentages show what fraction returned to use the feature on that retention day. Drop-off in the early days is normal. A sharp cliff after 30 days signals a problem.

Tip: Use the Compare button to overlay retention curves for different segments (e.g., monthly vs. annual plans, or high-value vs. low-value users). This reveals which groups churn fastest.

Calculate Churn Programmatically

If you need churn in your dashboard, alerts, or billing system, use Amplitude's user properties and Cohorts.

Identify Inactive Users

Track the last_event_timestamp in user properties—Amplitude does this automatically. When you need to identify churned users, look for those where the last event is older than your observation window (30, 60, or 90 days).

javascript
// Amplitude automatically tracks last_event_timestamp for every user.
// Check inactivity in your code:
const isChurned = (lastEventDate, observationWindowDays = 30) => {
  const now = new Date();
  const daysSince = (now - new Date(lastEventDate)) / (1000 * 60 * 60 * 24);
  return daysSince > observationWindowDays;
};

// Example: user last active 29 days ago
console.log(isChurned('2026-02-25', 30)); // false (not churned yet)
Amplitude stores last_event_timestamp automatically for each user

Create Cohorts of Churned Users

In Amplitude's Cohorts section, create a new cohort with the filter: last event time is more than 30 days ago. Or filter for users where the event subscription_cancelled exists. Save this cohort—it updates automatically as your data changes.

javascript
// Use the cohort in your app to flag or message churned users:
amplitude.setUserProperties({
  'in_churn_cohort': true,
  'churn_detection_date': new Date().toISOString()
});

// Or check programmatically based on last event timestamp:
const isInChurnCohort = (user) => {
  const thirtyDaysMs = 30 * 24 * 60 * 60 * 1000;
  return user.last_event_timestamp < Date.now() - thirtyDaysMs;
};
Cohorts in Amplitude update daily, so you always have fresh data

Calculate Churn Rate

Churn rate = (Churned Users / Total Users at Period Start) × 100. For accuracy, calculate retention by cohort (users who signed up in the same week) and then average across cohorts. This gives you a more stable metric.

javascript
// Simple churn rate
const calculateChurnRate = (totalUsers, churnedUsers) => {
  return (churnedUsers / totalUsers) * 100;
};

const churnRate = calculateChurnRate(1000, 250); // 25% churn

// Cohort-based churn (more stable)
const calculateCohortChurnRate = (signupCohorts) => {
  const rates = signupCohorts.map(cohort => {
    const retained = cohort.retained_at_30_days;
    const total = cohort.total_signups;
    return 100 - ((retained / total) * 100);
  });
  return rates.reduce((a, b) => a + b) / rates.length;
};

const avgChurnRate = calculateCohortChurnRate(cohortData);
Use cohort-based calculation for more stable month-over-month trends
Tip: Churn is noisy month-to-month. Calculate a rolling 90-day average to see trends more clearly and avoid reacting to statistical noise.

Common Pitfalls

  • Forgetting to track both explicit and implicit churn. Silent churn (users who stop engaging) often outnumbers cancellations—missing it understates your actual churn rate by 50% or more.
  • Changing your observation window mid-year. A 30-day and 60-day churn rate are not comparable. Pick one and stick with it, or track both separately by name for consistency.
  • Using the wrong 'retention event' in the Retention chart. If you set retention to 'login' but power users only use the API, your retention looks artificially low. Make sure your retention event reflects how users actually engage.
  • Ignoring subscription type. Trial users have 3-5x higher churn than paying customers. Calculate churn separately by plan and subscription status.

Wrapping Up

You now have three ways to measure churn in Amplitude: the Retention chart for quick answers, explicit events from your app for cancellations, and cohort analysis for silent churn. For most SaaS teams, the Retention chart is the fastest starting point. If you want to track this automatically across all your tools and benchmark against industry standards, Product Analyst can help.

Track these metrics automatically

Product Analyst connects to your stack and surfaces the insights that matter.

Try Product Analyst — Free