Customer Retention Rate Calculator

Customer Retention Rate Calculator & Guide :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ddd; –card-background: #fff; –shadow: 0 2px 5px rgba(0,0,0,0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–background-color); color: var(–text-color); line-height: 1.6; margin: 0; padding: 0; } .container { max-width: 960px; margin: 20px auto; padding: 20px; background-color: var(–card-background); border-radius: 8px; box-shadow: var(–shadow); } header { background-color: var(–primary-color); color: white; padding: 20px 0; text-align: center; margin-bottom: 20px; border-radius: 8px 8px 0 0; } header h1 { margin: 0; font-size: 2.5em; } .calculator-section { margin-bottom: 40px; padding: 30px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); } .calculator-section h2 { color: var(–primary-color); text-align: center; margin-top: 0; margin-bottom: 25px; } .input-group { margin-bottom: 20px; text-align: left; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(–primary-color); } .input-group input[type="number"], .input-group select { width: calc(100% – 22px); padding: 10px; border: 1px solid var(–border-color); border-radius: 4px; font-size: 1em; box-sizing: border-box; } .input-group .helper-text { font-size: 0.85em; color: #666; margin-top: 5px; display: block; } .error-message { color: red; font-size: 0.85em; margin-top: 5px; display: none; /* Hidden by default */ } .button-group { display: flex; justify-content: space-between; margin-top: 25px; flex-wrap: wrap; gap: 10px; } .button-group button { padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; transition: background-color 0.3s ease; flex: 1; min-width: 150px; } .btn-calculate { background-color: var(–primary-color); color: white; } .btn-calculate:hover { background-color: #003366; } .btn-reset { background-color: #6c757d; color: white; } .btn-reset:hover { background-color: #5a6268; } .btn-copy { background-color: var(–success-color); color: white; } .btn-copy:hover { background-color: #218838; } #results-container { margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); text-align: center; } #results-container h3 { color: var(–primary-color); margin-top: 0; margin-bottom: 20px; } .result-item { margin-bottom: 15px; padding: 10px; border-bottom: 1px dashed var(–border-color); } .result-item:last-child { border-bottom: none; } .result-label { font-weight: bold; color: #555; } .result-value { font-size: 1.2em; font-weight: bold; color: var(–primary-color); } .primary-result { font-size: 2em; color: var(–success-color); margin-bottom: 20px; padding: 15px; background-color: #e9f7ef; border-radius: 5px; display: inline-block; } .formula-explanation { font-size: 0.9em; color: #666; margin-top: 20px; padding: 15px; background-color: #f0f0f0; border-radius: 5px; text-align: left; } table { width: 100%; border-collapse: collapse; margin-top: 20px; margin-bottom: 30px; } th, td { padding: 12px; text-align: left; border: 1px solid var(–border-color); } th { background-color: var(–primary-color); color: white; font-weight: bold; } tr:nth-child(even) { background-color: #f2f2f2; } caption { font-size: 1.1em; font-weight: bold; color: var(–primary-color); margin-bottom: 10px; caption-side: top; text-align: left; } #chartContainer { text-align: center; margin-top: 30px; padding: 20px; background-color: var(–card-background); border-radius: 8px; box-shadow: var(–shadow); } #chartContainer canvas { max-width: 100%; height: auto; } .chart-caption { font-size: 0.9em; color: #666; margin-top: 10px; display: block; } .article-section { margin-top: 40px; padding: 30px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); } .article-section h2, .article-section h3 { color: var(–primary-color); margin-bottom: 15px; } .article-section h2 { border-bottom: 2px solid var(–primary-color); padding-bottom: 10px; } .article-section p, .article-section ul, .article-section ol { margin-bottom: 15px; } .article-section li { margin-bottom: 8px; } .faq-item { margin-bottom: 15px; padding: 10px; border-left: 3px solid var(–primary-color); background-color: #fefefe; border-radius: 4px; } .faq-item strong { color: var(–primary-color); display: block; margin-bottom: 5px; } .internal-links-section ul { list-style: none; padding: 0; } .internal-links-section li { margin-bottom: 10px; } .internal-links-section a { color: var(–primary-color); text-decoration: none; font-weight: bold; } .internal-links-section a:hover { text-decoration: underline; } .internal-links-section span { font-size: 0.9em; color: #666; display: block; margin-top: 3px; } @media (max-width: 768px) { .container { margin: 10px; padding: 15px; } header h1 { font-size: 1.8em; } .button-group button { flex: 1 1 100%; min-width: unset; } }

Customer Retention Rate Calculator

Measure and improve your customer loyalty.

Calculate Your Customer Retention Rate

Total customers you had at the beginning of the period.
Total customers you had at the end of the period.
Customers gained during the period (excluding retained ones).

Your Retention Metrics

Customers Lost During Period: 0
Retention Rate (%): 0.00%
Customer Churn Rate (%): 0.00%
Retention Ratio: 0.00
Formula Used:

Customer Retention Rate = ((E – N) / S) * 100

Where: E = Customers at End of Period, N = New Customers Acquired, S = Customers at Start of Period.

Customer Churn Rate = ((S – E) / S) * 100 or 100% – Retention Rate (%)

Retention Ratio = (Customers at End of Period – New Customers Acquired) / New Customers Acquired

Retention vs. Churn Over Time

Visualizing the relationship between retained and lost customers.
Key Metrics Summary
Metric Value Description
Customers at Start 0 Total customers at the beginning of the period.
Customers at End 0 Total customers at the end of the period.
New Customers Acquired 0 Customers gained during the period.
Customers Lost 0 Customers who stopped doing business during the period.
Retention Rate 0.00% Percentage of customers retained.
Churn Rate 0.00% Percentage of customers lost.
Retention Ratio 0.00 Ratio of retained customers to new customers.

What is Customer Retention Rate?

The customer retention rate calculator is a vital tool for any business aiming for sustainable growth. It quantizes how effectively a company keeps its existing customers over a specific period. In essence, it answers the question: "Of the customers we had at the start, how many are still with us at the end?" A high customer retention rate signifies strong customer loyalty, satisfaction, and a healthy business model. It's often more cost-effective to retain existing customers than to acquire new ones, making this metric a cornerstone of profitability and long-term success. Understanding your customer retention rate is crucial for assessing the health of your customer relationships and the effectiveness of your loyalty strategies.

Who should use it? This calculator is indispensable for businesses of all sizes and industries, including e-commerce stores, SaaS providers, subscription services, retail businesses, and even service-based companies. Anyone who relies on repeat business will find value in tracking their customer retention rate. It's particularly useful for marketing managers, customer success teams, and business owners looking to identify trends and areas for improvement.

Common Misconceptions: A frequent misunderstanding is that retention rate is simply the inverse of churn rate. While related, they are calculated differently and focus on different aspects. Another misconception is that a high retention rate automatically means high profitability; while correlated, other factors like customer lifetime value and acquisition cost also play significant roles. Some also believe that focusing solely on new customer acquisition is the path to growth, neglecting the immense value of nurturing existing customer relationships. This customer retention rate calculator helps clarify these points.

Customer Retention Rate Formula and Mathematical Explanation

The calculation of the customer retention rate is straightforward but requires precise data. The core idea is to determine the proportion of customers who remained with your business throughout a defined period, excluding those who were newly acquired during that same period.

The Primary Formula:

The most common formula for Customer Retention Rate (CRR) is:

CRR = ((E - N) / S) * 100

Variable Explanations:

  • E (Customers at End of Period): This is the total number of customers your business has at the very end of the specific time frame you are analyzing (e.g., end of the month, quarter, or year).
  • N (New Customers Acquired): This represents the number of *new* customers who made their first purchase or signed up during the period being analyzed. It's crucial to exclude these from the retention calculation itself, as they weren't customers for the entire duration.
  • S (Customers at Start of Period): This is the total number of customers your business had at the very beginning of the specific time frame you are analyzing.

Intermediate Calculations:

To better understand the dynamics, we also calculate:

  • Customers Lost (Churned Customers): This is calculated as Customers at Start (S) - (Customers at End (E) - New Customers Acquired (N)). Simplified, it's S - (E - N). This tells you how many customers you *didn't* retain.
  • Customer Churn Rate: This is the percentage of customers lost during the period. It can be calculated as (Customers Lost / Customers at Start) * 100 or more simply as 100% - Customer Retention Rate (%).
  • Retention Ratio: This ratio compares the number of customers you managed to keep (excluding new ones) to the number of new customers you acquired. It's calculated as (E - N) / N. A ratio greater than 1 indicates you retained more existing customers than you acquired new ones.

Variables Table:

Customer Retention Rate Variables
Variable Meaning Unit Typical Range
S (Customers at Start) Total customers at the beginning of the period. Count ≥ 0
E (Customers at End) Total customers at the end of the period. Count ≥ 0
N (New Customers) Customers acquired during the period. Count ≥ 0
E – N (Retained Customers) Customers from the start period who remained. Count 0 to S
Customers Lost Customers from the start period who churned. Count 0 to S
CRR (Retention Rate) Percentage of customers retained. % 0% to 100%+ (can exceed 100% if E is significantly larger than S+N, indicating massive growth)
Churn Rate Percentage of customers lost. % 0% to 100%
Retention Ratio Ratio of retained to new customers. Ratio 0 to ∞

Practical Examples (Real-World Use Cases)

Let's illustrate the customer retention rate calculator with practical scenarios:

Example 1: A Growing SaaS Company

Scenario: "CloudSync," a cloud storage provider, wants to assess its customer retention for the last quarter (Q3).

  • Customers at Start of Q3 (S): 5,000
  • Customers at End of Q3 (E): 5,300
  • New Customers Acquired in Q3 (N): 600

Using the calculator:

  • Customers Lost = 5,000 – (5,300 – 600) = 5,000 – 4,700 = 300
  • Retention Rate = ((5,300 – 600) / 5,000) * 100 = (4,700 / 5,000) * 100 = 94%
  • Churn Rate = 100% – 94% = 6%
  • Retention Ratio = (5,300 – 600) / 600 = 4,700 / 600 ≈ 7.83

Interpretation: CloudSync retained 94% of its existing customer base during Q3, losing only 6%. The retention ratio of 7.83 suggests that for every new customer acquired, they kept approximately 7.8 existing customers. This is a strong indicator of customer satisfaction and product stickiness. The company might focus on maintaining this high retention while continuing strategic acquisition.

Example 2: A Subscription Box Service

Scenario: "Gourmet Bites," a monthly gourmet snack subscription box, analyzes its retention for the month of April.

  • Customers at Start of April (S): 800
  • Customers at End of April (E): 750
  • New Customers Acquired in April (N): 150

Using the calculator:

  • Customers Lost = 800 – (750 – 150) = 800 – 600 = 200
  • Retention Rate = ((750 – 150) / 800) * 100 = (600 / 800) * 100 = 75%
  • Churn Rate = 100% – 75% = 25%
  • Retention Ratio = (750 – 150) / 150 = 600 / 150 = 4.00

Interpretation: Gourmet Bites retained 75% of its customers in April, but experienced a significant churn rate of 25%. The retention ratio of 4.00 means they kept 4 existing customers for every 1 new customer. This indicates a potential issue. While acquiring new customers is important, the high churn rate suggests problems with customer satisfaction, product value, or onboarding. The business needs to investigate why 25% of customers are leaving and implement strategies to improve retention, perhaps through better product curation, improved customer service, or loyalty programs.

How to Use This Customer Retention Rate Calculator

Our free online customer retention rate calculator is designed for ease of use. Follow these simple steps to get accurate insights into your business's customer loyalty:

  1. Identify Your Period: Decide on the time frame you want to analyze. This could be a month, a quarter, or a year. Consistency is key for tracking progress.
  2. Gather Your Data: You will need three key pieces of information for your chosen period:
    • The total number of customers you had at the very beginning of the period.
    • The total number of customers you had at the very end of the period.
    • The number of *new* customers you acquired *during* the period.
  3. Input the Values: Enter the numbers you gathered into the corresponding fields in the calculator: "Number of Customers at Start of Period," "Number of Customers at End of Period," and "Number of New Customers Acquired During Period."
  4. Calculate: Click the "Calculate Rate" button. The calculator will instantly process your inputs.
  5. Review the Results: You will see the following outputs:
    • Customers Lost During Period: The raw number of customers who churned.
    • Retention Rate (%): The primary metric, showing the percentage of customers you kept.
    • Churn Rate (%): The percentage of customers you lost.
    • Retention Ratio: A comparative metric showing retained vs. new customers.
    The results are also updated in the table below the calculator for a detailed summary. The chart provides a visual representation of the retention vs. churn dynamic.
  6. Interpret and Act: Use the results to understand your business's performance. A high retention rate (typically above 80% for many industries, though benchmarks vary) is desirable. If your rate is low, consider the factors discussed below and implement strategies to improve customer satisfaction and loyalty.
  7. Copy Results: If you need to share your findings or save them, use the "Copy Results" button. This will copy the main result, intermediate values, and key assumptions to your clipboard.
  8. Reset: Use the "Reset" button to clear the fields and start a new calculation.

How to Read Results:

  • High Retention Rate (>80-90%): Indicates strong customer satisfaction, product-market fit, and effective loyalty programs. Focus on maintaining this performance and optimizing for lifetime value.
  • Moderate Retention Rate (60-80%): Suggests room for improvement. Investigate customer feedback, onboarding processes, and product value proposition.
  • Low Retention Rate (<60%): A critical warning sign. High churn is likely impacting profitability. Prioritize understanding customer pain points and implementing significant changes to improve the customer experience.
  • Retention Ratio: A ratio significantly below 1 indicates you're acquiring customers but losing them faster than you're retaining them, which is unsustainable. A ratio above 1 is generally healthy.

Decision-Making Guidance:

Use the insights from the customer retention rate calculator to inform strategic decisions. For instance, if retention is low, you might allocate more resources to customer support, loyalty programs, or product development based on feedback. If retention is high, you might explore upselling or cross-selling opportunities to existing loyal customers.

Key Factors That Affect Customer Retention Rate Results

Several interconnected factors significantly influence your customer retention rate. Understanding these can help you pinpoint areas for improvement:

  1. Product/Service Quality & Value: The fundamental driver. If your offering consistently meets or exceeds customer expectations and provides perceived value for money, retention will naturally be higher. Poor quality, bugs, or a lack of perceived value lead directly to churn.
  2. Customer Service & Support: Excellent customer support can turn a negative experience into a positive one and build strong loyalty. Responsive, empathetic, and effective support channels are crucial. Conversely, poor support experiences are a major reason for customers leaving.
  3. Onboarding Experience: For many businesses, especially SaaS and subscription services, the initial onboarding process is critical. If customers don't quickly understand how to use the product and realize its value, they are likely to disengage early. A smooth, guided onboarding process significantly boosts initial retention.
  4. Pricing & Perceived Value: While not always the primary factor, pricing plays a role. If competitors offer similar value at a lower price, or if your pricing increases without a corresponding increase in perceived value, customers may leave. Regular price reviews and value communication are essential.
  5. Customer Engagement & Communication: Proactive communication, personalized offers, valuable content, and community building can keep customers engaged with your brand. Lack of engagement can lead to customers forgetting about your service or being more susceptible to competitor offers.
  6. Competitor Landscape: The availability and attractiveness of alternatives significantly impact retention. If competitors offer superior features, better pricing, or a more compelling user experience, your customers may be tempted to switch. Continuous market monitoring is necessary.
  7. Economic Conditions & Market Trends: Broader economic downturns can lead to customers cutting discretionary spending, impacting subscription services or non-essential purchases. Shifts in technology or consumer preferences can also make your offering less relevant over time.
  8. Loyalty Programs & Incentives: Rewarding repeat business through loyalty programs, exclusive discounts, or early access to new features can significantly incentivize customers to stay. These programs create a tangible benefit for continued patronage.

Frequently Asked Questions (FAQ)

Q1: What is considered a "good" customer retention rate?

A: A "good" customer retention rate varies significantly by industry. However, generally, rates above 80% are considered excellent. For subscription businesses, rates between 60-80% might be average, while industries with high transaction frequency might see lower rates but higher purchase frequency. Benchmarking against your specific industry is key.

Q2: How often should I calculate my customer retention rate?

A: It's best to calculate your customer retention rate consistently. Monthly or quarterly calculations are common for tracking trends and making timely adjustments. Annual calculations provide a broader overview.

Q3: Can my retention rate be over 100%?

A: Yes, technically. If the number of customers at the end of the period (E) is significantly larger than the number of customers at the start (S) plus new customers acquired (N), your retention rate can exceed 100%. This indicates massive growth where new customer acquisition far outpaces any potential churn, and the existing customer base is also growing substantially.

Q4: What's the difference between retention rate and customer lifetime value (CLV)?

A: Retention rate measures how well you keep customers over time. Customer Lifetime Value (CLV) estimates the total revenue a customer is expected to generate throughout their entire relationship with your business. While high retention often leads to higher CLV, they are distinct metrics measuring different aspects of customer relationships.

Q5: Does the calculator account for different customer segments?

A: This specific calculator provides an overall business-wide retention rate. For deeper insights, you should segment your customers (e.g., by acquisition channel, plan type, demographics) and calculate the retention rate for each segment separately.

Q6: How do I calculate "Customers Lost" if I don't track churn directly?

A: You can derive the number of lost customers. The number of retained customers is (E – N). Therefore, Customers Lost = S – (E – N). This calculator performs this calculation for you.

Q7: Is it better to focus on retention or acquisition?

A: Both are crucial for growth. However, studies consistently show that retaining existing customers is significantly more cost-effective (5-25 times cheaper) than acquiring new ones. A balanced strategy focusing on both, with a strong emphasis on retention, is typically the most sustainable path to profitability.

Q8: How can I improve my customer retention rate?

A: Focus on delivering exceptional product/service value, providing outstanding customer support, personalizing communication, implementing effective onboarding, offering loyalty programs, and actively seeking and acting on customer feedback. Understanding *why* customers leave is the first step to preventing it.

Related Tools and Internal Resources

© 2023 Your Company Name. All rights reserved.
var retentionChartInstance = null; // Global variable to hold chart instance function validateInput(id, min, max, errorId) { var input = document.getElementById(id); var value = parseFloat(input.value); var errorElement = document.getElementById(errorId); errorElement.style.display = 'none'; // Hide error initially if (isNaN(value)) { errorElement.textContent = "Please enter a valid number."; errorElement.style.display = 'block'; return false; } if (value max) { // errorElement.textContent = "Value exceeds maximum limit."; // errorElement.style.display = 'block'; // return false; // } return true; } function calculateRetentionRate() { var validStart = validateInput('customersAtStart', 0, Infinity, 'customersAtStartError'); var validEnd = validateInput('customersAtEnd', 0, Infinity, 'customersAtEndError'); var validNew = validateInput('newCustomers', 0, Infinity, 'newCustomersError'); if (!validStart || !validEnd || !validNew) { return; // Stop calculation if any input is invalid } var customersAtStart = parseFloat(document.getElementById('customersAtStart').value); var customersAtEnd = parseFloat(document.getElementById('customersAtEnd').value); var newCustomers = parseFloat(document.getElementById('newCustomers').value); var retainedCustomers = customersAtEnd – newCustomers; var customersLost = customersAtStart – retainedCustomers; // Ensure retainedCustomers is not negative if E < N (though unlikely with valid inputs) if (retainedCustomers < 0) retainedCustomers = 0; // Ensure customersLost is not negative if S < retainedCustomers (indicates massive growth) if (customersLost 0) { retentionRate = (retainedCustomers / customersAtStart) * 100; } var churnRate = 0; if (customersAtStart > 0) { churnRate = (customersLost / customersAtStart) * 100; } // Alternative churn rate calculation for consistency churnRate = 100 – retentionRate; if (churnRate 100% retention var retentionRatio = 0; if (newCustomers > 0) { retentionRatio = retainedCustomers / newCustomers; } else if (retainedCustomers > 0) { retentionRatio = Infinity; // If no new customers but retained customers exist } document.getElementById('customersLost').textContent = Math.round(customersLost); document.getElementById('retentionRate').textContent = retentionRate.toFixed(2) + '%'; document.getElementById('churnRate').textContent = churnRate.toFixed(2) + '%'; document.getElementById('retentionRatio').textContent = retentionRatio.toFixed(2); // Update table document.getElementById('tableStartCustomers').textContent = customersAtStart; document.getElementById('tableEndCustomers').textContent = customersAtEnd; document.getElementById('tableNewCustomers').textContent = newCustomers; document.getElementById('tableCustomersLost').textContent = Math.round(customersLost); document.getElementById('tableRetentionRate').textContent = retentionRate.toFixed(2) + '%'; document.getElementById('tableChurnRate').textContent = churnRate.toFixed(2) + '%'; document.getElementById('tableRetentionRatio').textContent = retentionRatio.toFixed(2); updateChart(retentionRate, churnRate); } function resetCalculator() { document.getElementById('customersAtStart').value = '1000'; document.getElementById('customersAtEnd').value = '1100'; document.getElementById('newCustomers').value = '200'; // Clear errors document.getElementById('customersAtStartError').textContent = "; document.getElementById('customersAtStartError').style.display = 'none'; document.getElementById('customersAtEndError').textContent = "; document.getElementById('customersAtEndError').style.display = 'none'; document.getElementById('newCustomersError').textContent = "; document.getElementById('newCustomersError').style.display = 'none'; calculateRetentionRate(); // Recalculate with default values } function copyResults() { var retentionRate = document.getElementById('retentionRate').textContent; var churnRate = document.getElementById('churnRate').textContent; var retentionRatio = document.getElementById('retentionRatio').textContent; var customersLost = document.getElementById('customersLost').textContent; var customersAtStart = document.getElementById('customersAtStart').value; var customersAtEnd = document.getElementById('customersAtEnd').value; var newCustomers = document.getElementById('newCustomers').value; var resultsText = "Customer Retention Rate Calculation:\n\n"; resultsText += "Key Assumptions:\n"; resultsText += "- Customers at Start: " + customersAtStart + "\n"; resultsText += "- Customers at End: " + customersAtEnd + "\n"; resultsText += "- New Customers Acquired: " + newCustomers + "\n\n"; resultsText += "Results:\n"; resultsText += "- Customers Lost: " + customersLost + "\n"; resultsText += "- Retention Rate: " + retentionRate + "\n"; resultsText += "- Churn Rate: " + churnRate + "\n"; resultsText += "- Retention Ratio: " + retentionRatio + "\n"; // Use a temporary textarea to copy text var textArea = document.createElement("textarea"); textArea.value = resultsText; textArea.style.position = "fixed"; textArea.style.left = "-9999px"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { var successful = document.execCommand('copy'); var msg = successful ? 'Results copied!' : 'Copy failed!'; // Optionally show a temporary message to the user var copyButton = document.querySelector('.btn-copy'); var originalText = copyButton.textContent; copyButton.textContent = msg; setTimeout(function() { copyButton.textContent = originalText; }, 2000); } catch (err) { console.error('Fallback: Oops, unable to copy', err); var copyButton = document.querySelector('.btn-copy'); var originalText = copyButton.textContent; copyButton.textContent = 'Copy failed!'; setTimeout(function() { copyButton.textContent = originalText; }, 2000); } document.body.removeChild(textArea); } function updateChart(retentionRate, churnRate) { var ctx = document.getElementById('retentionChart').getContext('2d'); // Destroy previous chart instance if it exists if (retentionChartInstance) { retentionChartInstance.destroy(); } // Ensure rates are within reasonable bounds for display (0-100) var displayRetention = Math.max(0, Math.min(100, retentionRate)); var displayChurn = Math.max(0, Math.min(100, churnRate)); retentionChartInstance = new Chart(ctx, { type: 'bar', // Use bar chart for comparison data: { labels: ['Retention Rate', 'Churn Rate'], datasets: [{ label: 'Percentage (%)', data: [displayRetention, displayChurn], backgroundColor: [ 'rgba(40, 167, 69, 0.7)', // Success color for retention 'rgba(220, 53, 69, 0.7)' // Danger color for churn ], borderColor: [ 'rgba(40, 167, 69, 1)', 'rgba(220, 53, 69, 1)' ], borderWidth: 1 }] }, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true, max: 100, title: { display: true, text: 'Percentage (%)' } } }, plugins: { legend: { display: false // Hide legend as labels are clear }, title: { display: true, text: 'Retention vs. Churn Comparison' } } } }); } // Initial calculation on page load document.addEventListener('DOMContentLoaded', function() { calculateRetentionRate(); });

Leave a Comment