body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #f9f9f9;
}
h1, h2, h3 {
color: #2c3e50;
}
.calculator-container {
background: #ffffff;
border: 1px solid #e1e1e1;
border-radius: 8px;
padding: 25px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
margin-bottom: 40px;
}
.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
font-weight: 600;
margin-bottom: 5px;
font-size: 0.9em;
color: #555;
}
.form-group input {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box; /* Ensures padding doesn't affect width */
}
.section-title {
grid-column: 1 / -1;
font-size: 1.1em;
font-weight: 700;
color: #0073aa;
border-bottom: 2px solid #0073aa;
padding-bottom: 5px;
margin-top: 10px;
margin-bottom: 15px;
}
.calculate-btn {
grid-column: 1 / -1;
background-color: #0073aa;
color: white;
border: none;
padding: 15px;
font-size: 18px;
font-weight: bold;
border-radius: 4px;
cursor: pointer;
width: 100%;
margin-top: 10px;
transition: background-color 0.3s;
}
.calculate-btn:hover {
background-color: #005a87;
}
.results-container {
grid-column: 1 / -1;
background-color: #f0f7fb;
border: 1px solid #cce5ff;
border-radius: 4px;
padding: 20px;
margin-top: 20px;
display: none;
}
.result-row {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #dae1e7;
}
.result-row:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.result-label {
color: #555;
}
.result-value {
font-weight: bold;
color: #2c3e50;
}
.total-mhr {
font-size: 1.3em;
color: #0073aa;
font-weight: 800;
}
.article-content {
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
table.excel-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
font-size: 0.9em;
}
table.excel-table th, table.excel-table td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
table.excel-table th {
background-color: #f2f2f2;
}
.code-block {
background-color: #f4f4f4;
padding: 10px;
border-left: 4px solid #0073aa;
font-family: monospace;
margin: 10px 0;
overflow-x: auto;
}
@media (max-width: 600px) {
.form-grid {
grid-template-columns: 1fr;
}
}
function calculateMHR() {
// 1. Get Values
var cost = parseFloat(document.getElementById("costOfMachine").value) || 0;
var scrap = parseFloat(document.getElementById("scrapValue").value) || 0;
var life = parseFloat(document.getElementById("usefulLife").value) || 0;
var hours = parseFloat(document.getElementById("annualHours").value) || 0;
var rent = parseFloat(document.getElementById("annualRent").value) || 0;
var insurance = parseFloat(document.getElementById("annualInsurance").value) || 0;
var repairs = parseFloat(document.getElementById("annualRepairs").value) || 0;
var consumables = parseFloat(document.getElementById("annualConsumables").value) || 0;
var powerUnits = parseFloat(document.getElementById("powerUnits").value) || 0;
var ratePerUnit = parseFloat(document.getElementById("ratePerUnit").value) || 0;
// 2. Validate essential divisor
if (hours <= 0) {
alert("Effective Annual Hours must be greater than zero.");
return;
}
if (life <= 0) {
alert("Useful Life must be greater than zero.");
return;
}
// 3. Logic
// Depreciation Calculation
// Total Depreciable Value = Cost – Scrap
// Annual Depreciation = Total Depreciable Value / Life
var annualDepreciation = (cost – scrap) / life;
var hourlyDepreciation = annualDepreciation / hours;
// Fixed/Standing Charges (Allocated Annually)
var totalAnnualFixed = rent + insurance;
var hourlyFixed = totalAnnualFixed / hours;
// Variable/Running Charges
// Repairs + Consumables (Annualized inputs converted to hourly)
var annualVariableMisc = repairs + consumables;
var hourlyVariableMisc = annualVariableMisc / hours;
// Power Cost (Already hourly based on units * rate)
var hourlyPower = powerUnits * ratePerUnit;
// Total MHR
var totalMHR = hourlyDepreciation + hourlyFixed + hourlyVariableMisc + hourlyPower;
// 4. Display Results
document.getElementById("resDepreciation").innerText = hourlyDepreciation.toFixed(2);
document.getElementById("resFixed").innerText = hourlyFixed.toFixed(2);
document.getElementById("resVariableMisc").innerText = hourlyVariableMisc.toFixed(2);
document.getElementById("resPower").innerText = hourlyPower.toFixed(2);
document.getElementById("resTotal").innerText = totalMHR.toFixed(2);
document.getElementById("results").style.display = "block";
}
How to Calculate Machine Hour Rate in Excel
Calculating the Machine Hour Rate (MHR) is a fundamental process in cost accounting, particularly for manufacturing businesses. It determines the cost incurred to run a specific machine for one hour. This figure is crucial for accurately pricing products, estimating project costs, and budgeting for overheads.
Whether you are a cost accountant, a factory manager, or a student, understanding how to calculate MHR both manually and in Excel is a valuable skill. This guide covers the formula, a breakdown of costs, and a tutorial on setting up an automated spreadsheet.
What is Machine Hour Rate?
The Machine Hour Rate represents the overhead cost absorbed by a specific machine per hour of operation. It is calculated by dividing the total overheads attributable to the machine by the effective machine hours.
Formula: MHR = Total Machine Overheads / Total Productive Machine Hours
Components of the Calculation
To calculate MHR accurately, costs are divided into two categories:
- Standing Charges (Fixed Costs): These costs remain constant regardless of whether the machine is running or not. Examples include rent, insurance, tax, and supervisor salaries.
- Running Charges (Variable Costs): These costs occur only when the machine is operational. Examples include depreciation, power/electricity, repairs, and maintenance.
Step-by-Step Guide: Calculating MHR in Excel
Excel allows you to automate this calculation. Below is a structured way to set up your worksheet.
1. Setup Your Data Table
Open Excel and create a new sheet. We will use columns A, B, and C. Column A will hold the description, Column B the input values, and Column C the calculated annual amounts.
| Cell Reference |
Content (Label) |
Example Data |
| A1 |
Machine Data |
|
| A2 / B2 |
Cost of Machine |
50000 |
| A3 / B3 |
Scrap Value |
5000 |
| A4 / B4 |
Useful Life (Years) |
10 |
| A5 / B5 |
Annual Effective Hours |
2000 |
2. Input Standing Charges (Annual)
List your fixed costs. If you have monthly rent, multiply by 12 to get the annual figure.
| Cell Reference |
Content |
Example Data |
| A7 / B7 |
Rent (Allocated) |
1200 |
| A8 / B8 |
Insurance |
800 |
| A9 / B9 |
Supervisor Salary |
6000 |
3. Input Running Charges
For electricity, you can calculate the hourly cost directly or annualize it.
| Cell Reference |
Content |
Example Data |
| A11 / B11 |
Annual Repairs |
1500 |
| A12 / B12 |
Power Cost per Hour |
5.00 |
4. The Excel Formulas
Now, calculate the final rate in a summary section using these formulas:
- Annual Depreciation:
= (B2 - B3) / B4
- Total Annual Standing Charges:
= SUM(B7:B9)
- Standing Charge Per Hour:
= (Total Annual Standing Charges) / B5
- Depreciation Per Hour:
= (Annual Depreciation) / B5
- Repairs Per Hour:
= B11 / B5
- Final Machine Hour Rate:
= Standing Charge Per Hour + Depreciation Per Hour + Repairs Per Hour + B12
Important Considerations
Effective Working Hours
Always use "Effective" or "Productive" hours, not just the total calendar hours. You must deduct setup time and scheduled maintenance downtime from the total available hours to avoid underpricing your machine time.
Apportionment of Overheads
Items like rent and lighting are often factory-wide costs. You must apportion these to the specific machine based on the floor area (sq. ft.) the machine occupies relative to the total factory area.
Why Use a Calculator?
While Excel is excellent for saving records, the calculator above provides a quick "what-if" analysis. You can instantly see how changing the number of working hours affects your hourly rate. Generally, increasing machine utilization (hours) decreases the fixed cost per hour, thereby lowering the overall Machine Hour Rate.