Please enter valid positive numbers. Useful Life must be greater than 0.
Depreciation Rate (Annual):20.00%
Depreciable Base:$9,000.00
Annual Depreciation Expense:$1,800.00
Monthly Depreciation Expense:$150.00
function calculateDepreciation() {
// 1. Get DOM elements
var costInput = document.getElementById("sld_asset_cost");
var salvageInput = document.getElementById("sld_salvage_value");
var lifeInput = document.getElementById("sld_useful_life");
var errorMsg = document.getElementById("sld_error_msg");
var resultsArea = document.getElementById("sld_results_area");
// 2. Parse values
var cost = parseFloat(costInput.value);
var salvage = parseFloat(salvageInput.value);
var life = parseFloat(lifeInput.value);
// 3. Validation Logic
// Reset error state
errorMsg.style.display = "none";
resultsArea.style.display = "none";
// Check for NaN or invalid life
if (isNaN(cost) || isNaN(salvage) || isNaN(life)) {
errorMsg.innerHTML = "Please enter valid numeric values in all fields.";
errorMsg.style.display = "block";
return;
}
if (life cost) {
errorMsg.innerHTML = "Salvage Value cannot exceed Asset Cost.";
errorMsg.style.display = "block";
return;
}
// 4. Calculations
// Straight Line Depreciation Rate = (100% / Useful Life)
var depreciationRate = 100 / life;
// Depreciable Base = Cost – Salvage Value
var depreciableBase = cost – salvage;
// Annual Depreciation Expense = (Cost – Salvage) / Life
var annualDepreciation = depreciableBase / life;
// Monthly Depreciation = Annual / 12
var monthlyDepreciation = annualDepreciation / 12;
// 5. Formatting (Currency and Percent)
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2
});
// 6. Update Output
document.getElementById("res_rate").innerText = depreciationRate.toFixed(2) + "%";
document.getElementById("res_base").innerText = formatter.format(depreciableBase);
document.getElementById("res_annual").innerText = formatter.format(annualDepreciation);
document.getElementById("res_monthly").innerText = formatter.format(monthlyDepreciation);
// 7. Show Results
resultsArea.style.display = "block";
}
How to Calculate Rate of Depreciation in Straight Line Method
The Straight Line Method is the simplest and most commonly used technique for calculating depreciation. It assumes that an asset loses value at a constant rate over its useful life. This guide will explain how to calculate the rate of depreciation using this method and how to apply it to your business assets.
What is the Straight Line Depreciation Method?
Straight-line depreciation spreads the cost of a fixed asset evenly over its useful life. Unlike accelerated methods (like Double Declining Balance), the straight-line method results in the same depreciation expense amount for every year the asset is in use.
The Formula
There are two primary formulas you need to know. First, the formula to find the annual expense, and second, the formula to find the depreciation rate percentage.
Determine the Asset Cost: This includes the purchase price, taxes, shipping, and setup fees required to get the asset ready for use.
Estimate the Salvage Value: Also known as residual value, this is the estimated amount you can sell the asset for at the end of its life. If the asset will be worthless, this is 0.
Determine Useful Life: How many years do you expect the asset to be productive?
Calculate Depreciable Base: Subtract the Salvage Value from the Asset Cost.
Divide by Useful Life: This gives you the annual expense.
Calculation Example
Let's say your company buys a machine for $50,000. You estimate it can be sold for scrap for $5,000 after 10 years.
Component
Value
Asset Cost
$50,000
Salvage Value
$5,000
Depreciable Base ($50k – $5k)
$45,000
Useful Life
10 Years
Step 1: Calculate the Rate
Rate = (1 / 10 years) × 100 = 10% per year.
Knowing how to calculate the rate of depreciation helps in financial forecasting and tax planning. A constant rate makes it easier to predict future expenses and impact on net income. It is widely accepted by tax authorities (GAAP and IFRS) for reporting financial statements because it represents a fair allocation of cost over time.