Churn Is a Lagging Indicator
By the time a customer cancels, it's too late. The decision was made weeks or months before the cancellation click. Most SaaS products track monthly churn rate as a headline metric, but that's like monitoring your rearview mirror while driving. We wanted to look through the windshield — predicting which customers would churn before they decided to leave, so we could intervene.
We built this system for our own SaaS products and two client products. The approach is more accessible than you might think — it's not deep learning, it's mostly SQL queries and a simple model.
The Leading Indicators That Actually Matter
We tested dozens of usage metrics as churn predictors. Most were noise. Here are the ones that consistently predicted churn across three different SaaS products. Login frequency decline — not absolute login count, but the trend. A user who logged in daily and now logs in twice a week is at risk, even if twice a week is normal for other users. We calculate this as a 7-day rolling average compared to the 30-day rolling average. When the 7-day drops below 60% of the 30-day, that's a signal.
Feature adoption breadth. Users who use 5+ features churn at 4%. Users who use only 1-2 features churn at 22%. This makes sense — users who only use one feature haven't integrated the product into their workflow deeply enough to justify the cost. We track the distinct features used per user per week, where a "feature" is a meaningful product action (not page views, but actual functional interactions like "created a report" or "set up an alert").
Support ticket sentiment. We run a simple sentiment classifier (using GPT-4o-mini, costs about $2/month) on incoming support tickets. A customer who sends two negative-sentiment tickets in a 30-day window churns at 35%. We flag these accounts for proactive outreach by the customer success team.
The Prediction Model
We use a gradient-boosted decision tree (XGBoost) with 12 features. Nothing fancy. The features include the login frequency trend, feature adoption breadth, support ticket count and sentiment, days since last meaningful action, billing history (failed payments are a strong predictor), and contract type (monthly contracts churn 3x more than annual). The model is trained on 18 months of historical data and retrained monthly.
Accuracy: 78% precision at 30 days before churn (meaning 78% of users the model flags as "at risk" actually churn within 30 days). Recall is 65% (meaning we catch 65% of churning users). These numbers aren't perfect, but they're actionable — the customer success team has a prioritized list of at-risk accounts to focus on, rather than trying to proactively support everyone.
The Data Pipeline
The hardest part wasn't the model — it was getting the data into a queryable format. Product usage events are in our application database. Support tickets are in Zendesk. Billing data is in Stripe. Login data is in our auth system (Clerk). We built a lightweight ETL pipeline using simple cron jobs that pull data from each source daily and load it into a PostgreSQL analytics schema. Nothing as complex as Airflow or dbt (we're not processing terabytes here) — just Python scripts that run via GitHub Actions on a schedule.
The prediction model runs daily on the aggregated data and outputs a risk score (0-100) for each active account. Scores above 70 are flagged as "high risk" and appear in a Slack channel that the customer success team monitors. Each alert includes the specific signals that drove the score: "Login frequency declined 55% in the last 7 days. No new reports created in 14 days. One negative support ticket about billing."
What We Do With the Predictions
Prediction without action is just advanced worrying. Our intervention playbook: score 50-70 (medium risk) triggers an automated email from the CSM with personalized tips based on unused features. Score 70-85 (high risk) triggers a personal email from the CSM offering a call to discuss their experience. Score 85+ (very high risk) triggers a call from the account manager with the authority to offer retention incentives (extended trial, discounted renewal, dedicated onboarding session).
Since implementing this system, one client's monthly churn rate dropped from 6.2% to 4.1%. That might sound incremental, but for a SaaS with $50K MRR, the difference between 6.2% and 4.1% monthly churn is the difference between the company dying and the company growing. Compounding is brutal in both directions.