This calculator helps you estimate the approval rate for a specific process or application by considering the number of submitted items and the number of approved items.
function calculateApprovalRate() {
var totalSubmissionsInput = document.getElementById("totalSubmissions");
var totalApprovalsInput = document.getElementById("totalApprovals");
var resultDiv = document.getElementById("result");
var totalSubmissions = parseFloat(totalSubmissionsInput.value);
var totalApprovals = parseFloat(totalApprovalsInput.value);
// Input validation
if (isNaN(totalSubmissions) || totalSubmissions <= 0) {
resultDiv.textContent = "Please enter a valid number for Total Submissions (must be greater than 0).";
return;
}
if (isNaN(totalApprovals) || totalApprovals totalSubmissions) {
resultDiv.textContent = "Total Approvals cannot be greater than Total Submissions.";
return;
}
// Calculate approval rate
var approvalRate = (totalApprovals / totalSubmissions) * 100;
// Display the result
resultDiv.textContent = "Approval Rate: " + approvalRate.toFixed(2) + "%";
}