function calculateLRV() {
var stdRateInput = document.getElementById('stdRate').value;
var actRateInput = document.getElementById('actRate').value;
var actHoursInput = document.getElementById('actHours').value;
// Validation
if (stdRateInput === "" || actRateInput === "" || actHoursInput === "") {
alert("Please fill in all fields (Standard Rate, Actual Rate, and Actual Hours).");
return;
}
var stdRate = parseFloat(stdRateInput);
var actRate = parseFloat(actRateInput);
var actHours = parseFloat(actHoursInput);
if (isNaN(stdRate) || isNaN(actRate) || isNaN(actHours)) {
alert("Please enter valid numeric values.");
return;
}
if (actHours < 0 || stdRate < 0 || actRate 0) {
// Actual Rate > Standard Rate = Unfavorable
lrvStatus.innerHTML = "Unfavorable (U)";
lrvStatus.className = "result-status status-unfavorable";
resultBox.classList.add("unfavorable");
} else if (totalVariance < 0) {
// Actual Rate < Standard Rate = Favorable
lrvStatus.innerHTML = "Favorable (F)";
lrvStatus.className = "result-status status-favorable";
resultBox.classList.add("favorable");
} else {
lrvStatus.innerHTML = "No Variance";
lrvStatus.className = "result-status";
lrvValue.innerHTML = "$0.00";
}
}
How to Calculate Labour Rate Variance
Labour Rate Variance (LRV) is a critical cost accounting metric used to measure the difference between the actual cost of labor and the standard cost that was budgeted for the actual number of hours worked. It helps management identify whether the company is paying more or less for labor than anticipated.
The Labour Rate Variance Formula
To calculate the variance, you need three specific data points: the standard hourly rate you planned to pay, the actual hourly rate you did pay, and the total number of actual hours worked.
Formula:
LRV = (Actual Hourly Rate – Standard Hourly Rate) × Actual Hours Worked
Alternatively, it can be calculated as:
LRV = (Actual Hours × Actual Rate) – (Actual Hours × Standard Rate)
Interpreting the Results
Understanding whether a variance is "Favorable" or "Unfavorable" is key to financial analysis:
Unfavorable Variance: This occurs when the Actual Rate is higher than the Standard Rate. It means the company spent more per hour than budgeted.
Favorable Variance: This occurs when the Actual Rate is lower than the Standard Rate. It means the company saved money on hourly wages compared to the budget.
Example Calculation
Let's say a manufacturing company budgets a standard labor rate of $20.00 per hour. However, due to overtime requirements, the actual rate paid averages out to $22.00 per hour. The team worked a total of 1,000 hours during the period.