5 min read

What Is Cohort Analysis in Amplitude

Cohorts let you group users who share something in common—whether it's when they signed up, what feature they used, or their plan tier. Once you've defined a cohort, Amplitude lets you track how those users behave over time, which is essential for understanding retention, measuring the impact of feature releases, and debugging user growth.

What Cohorts Actually Are

A cohort is a slice of your user base grouped by a shared characteristic or action during a specific time window.

Understand the core concept

A cohort answers 'what happened to users who did X between date A and date B?' For example: users who signed up in January, users who hit an error in the onboarding flow, or users on your Enterprise plan. Amplitude stores cohort memberships so you can cross-reference them in other analysis views like Retention, Frequency, or custom dashboards.

javascript
// Users must be identified properly for cohort creation
amplitude.identify(new amplitude.Identify()
  .set('plan', 'Enterprise')
  .set('signup_date', '2026-01-15')
  .set('onboarding_complete', true)
);
Set user properties that will be used to define cohorts

Know the two cohort types

Event-based cohorts group users by actions they took (e.g., completed a purchase). Property-based cohorts group by user attributes (e.g., plan equals 'Pro'). Most commonly, you'll combine both—users who signed up in a time window AND have a certain property.

javascript
// Track events with properties to enable event-based cohorts
amplitude.track('Feature_Used', {
  feature_name: 'Advanced_Filtering',
  feature_category: 'Analytics',
  is_new_user: false
});
Rich event tracking enables more meaningful cohorts
Watch out: Cohorts defined by signup date are based on when Amplitude first saw the user, not necessarily when they created their account. If you have historical data gaps, cohorts might be incomplete.

Creating and Managing Cohorts

You can build cohorts directly in the Amplitude UI or via the Cohort API.

Build a cohort in the UI

Navigate to Cohorts and click Create. Choose either an event or a user property as your filter. For event-based cohorts, set a time window (e.g., 'users who completed Purchase_Complete in the last 30 days'). For property-based cohorts, select the property and value (e.g., 'plan is Premium'). Save and Amplitude computes membership immediately.

javascript
// Access the Cohorts API to programmatically create cohorts
const cohortDefinition = {
  name: 'January_2026_Signups',
  description: 'Users who signed up in January 2026',
  criteria: {
    filter: [
      {
        subproperties: [
          { key: 'signup_source', op: 'is', value: 'organic' }
        ]
      }
    ]
  }
};

fetch('https://api.amplitude.com/api/2/cohorts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(cohortDefinition)
});
Create cohorts programmatically via the Cohort API

Use cohorts in other analyses

Once created, your cohort appears in segmentation dropdowns across Retention, Funnel, Frequency, and other analysis views. Select it to isolate that group's behavior. You can also add multiple cohorts to the same chart for side-by-side comparison.

javascript
// Cohorts are referenced in segmentation filters
// When you query via the API, include cohort filters
const analysisQuery = {
  event_type: 'Purchase_Complete',
  user_property_filters: [
    { property_name: 'cohort', operator: 'is', value: 'January_2026_Signups' }
  ],
  group_by: 'amplitude_user_id'
};
Reference cohorts in analysis queries
Tip: Cohorts are computed on-demand, not continuously. If you update user properties, manually trigger a recompute in the Cohorts manager to see fresh membership.

Using Cohorts to Analyze Retention

Cohort analysis shines when you track retention—how many users stay active over time.

Run a retention analysis on a cohort

Go to Retention and create a new chart. Select your cohort from the Segmentation dropdown. Choose a reactivation event (the action that counts as staying active, like 'Login' or 'Feature_Used') and a time interval (daily, weekly, or monthly). Amplitude will show a table where each row is your cohort and each column is a time period, with retention percentages.

javascript
// Ensure events are tracked consistently for accurate retention
amplitude.track('Active_Session', {
  session_length: 1200,
  features_used: JSON.stringify(['filter', 'export', 'share']),
  user_tier: 'Premium',
  returning_user: true
});

// This event data powers retention analysis
Consistent, property-rich event tracking enables accurate retention curves

Interpret the retention table

Rows represent your cohort (e.g., 'January 2026 signups'). Columns are time buckets—Day 0, Week 1, Week 2, Month 1, etc. Numbers are the percentage of that cohort still active at each step. A steep drop-off in the first week signals early churn; flat retention after day 30 suggests stable power users.

javascript
// Track activation and reactivation separately to get full retention context
// Activation (first meaningful action)
amplitude.track('Onboarding_Complete', {
  cohort_id: 'January_2026_Signups',
  days_to_activate: 2,
  activation_path: 'trial_to_paid'
});

// Reactivation (ongoing engagement)
amplitude.track('Login', {
  days_since_signup: 14,
  session_number: 5
});
Separate tracking for activation and reactivation improves retention analysis
Watch out: Retention is sensitive to your reactivation event. If you pick a rare event like 'Upgraded_Plan', everyone looks churned. If you pick a noisy event like 'Page_View', retention looks artificially high. Choose an event that represents genuine product engagement.

Common Pitfalls

  • Assuming cohort membership updates automatically. Amplitude computes cohorts on demand, so if you update user properties, the cohort won't reflect those changes until you trigger a recompute.
  • Creating too many overlapping cohorts. More than 10–15 cohorts per project becomes hard to manage and makes comparisons meaningless.
  • Using only signup date as your cohort dimension. Users acquired in the same month often behave very differently. Layer in another dimension like plan tier or feature adoption.
  • Picking the wrong reactivation event for retention analysis. 'Page view' is too noisy, 'premium feature used' is too narrow. Choose an event that actually represents meaningful activity.

Wrapping Up

Cohort analysis in Amplitude turns raw user data into actionable insights. By grouping users who share characteristics and tracking their behavior over time, you can spot retention trends, debug churn, and measure feature impact. If you want to automate cohort creation and integrate it with your analytics pipeline, Product Analyst can help.

Track these metrics automatically

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

Try Product Analyst — Free