How to Calculate Equipment Utilization Rate
function calculateUtilization() {
var actual = document.getElementById('actualHours').value;
var available = document.getElementById('availableHours').value;
var resultArea = document.getElementById('resultArea');
var scoreDisplay = document.getElementById('utilizationScore');
var messageDisplay = document.getElementById('utilizationMessage');
var actualVal = parseFloat(actual);
var availableVal = parseFloat(available);
if (isNaN(actualVal) || isNaN(availableVal)) {
alert("Please enter valid numbers for both fields.");
return;
}
if (availableVal availableVal) {
alert("Actual hours cannot exceed available hours. Please check your data.");
return;
}
var utilization = (actualVal / availableVal) * 100;
var finalResult = utilization.toFixed(2);
resultArea.style.display = "block";
scoreDisplay.innerHTML = finalResult + "%";
var message = "";
var color = "";
if (utilization >= 85) {
message = "High Utilization: Your equipment is working at peak capacity. Monitor for wear and tear.";
color = "#27ae60";
} else if (utilization >= 60) {
message = "Optimal Utilization: This is a healthy range for most industrial equipment.";
color = "#2980b9";
} else if (utilization >= 40) {
message = "Moderate Utilization: Consider if the asset is being used effectively or if it's over-specified.";
color = "#f39c12";
} else {
message = "Low Utilization: The equipment is idle most of the time. Evaluate the need for this asset.";
color = "#c0392b";
}
scoreDisplay.style.color = color;
messageDisplay.innerHTML = message;
resultArea.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}