Cancellation Rate Calculator

Cancellation Rate Calculator

A cancellation rate, often referred to as churn rate, measures the percentage of customers who stop using a service or product over a specific period. It's a critical metric for subscription-based businesses as it directly impacts revenue and growth. A high cancellation rate can indicate issues with customer satisfaction, product value, or onboarding. Understanding and reducing your cancellation rate is key to sustainable business success.

function calculateCancellationRate() { var customersAtStart = parseFloat(document.getElementById("customersAtStart").value); var customersCancelled = parseFloat(document.getElementById("customersCancelled").value); var customersAdded = parseFloat(document.getElementById("customersAdded").value); var resultDiv = document.getElementById("result"); resultDiv.innerHTML = ""; // Clear previous results if (isNaN(customersAtStart) || isNaN(customersCancelled) || isNaN(customersAdded)) { resultDiv.innerHTML = "Please enter valid numbers for all fields."; return; } if (customersAtStart <= 0) { resultDiv.innerHTML = "Number of customers at the start of the period must be greater than zero."; return; } if (customersCancelled < 0) { resultDiv.innerHTML = "Number of customers cancelled cannot be negative."; return; } if (customersAdded < 0) { resultDiv.innerHTML = "Number of new customers added cannot be negative."; return; } // Formula: Cancellation Rate = (Number of Customers Cancelled / Number of Customers at Start of Period) * 100 var cancellationRate = (customersCancelled / customersAtStart) * 100; // Display the result resultDiv.innerHTML = "

Cancellation Rate Result:

" + "The cancellation rate for this period is: " + cancellationRate.toFixed(2) + "%"; } .calculator-container { font-family: sans-serif; border: 1px solid #ddd; padding: 20px; border-radius: 8px; max-width: 500px; margin: 20px auto; background-color: #f9f9f9; } .calculator-container h2 { text-align: center; margin-bottom: 20px; color: #333; } .calculator-inputs { margin-bottom: 20px; } .form-group { margin-bottom: 15px; } .form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #555; } .form-group input[type="number"] { width: calc(100% – 22px); /* Adjust for padding and border */ padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; /* Include padding and border in the element's total width and height */ } button { display: block; width: 100%; padding: 12px; background-color: #4CAF50; color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; } button:hover { background-color: #45a049; } #result { margin-top: 20px; padding: 15px; border: 1px solid #eee; background-color: #fff; border-radius: 4px; text-align: center; } #result h3 { margin-top: 0; color: #333; }

Leave a Comment