function calculateDDB() {
var cost = parseFloat(document.getElementById('assetCost').value);
var salvage = parseFloat(document.getElementById('salvageValue').value);
var life = parseFloat(document.getElementById('usefulLife').value);
if (isNaN(cost) || isNaN(salvage) || isNaN(life) || life <= 0 || cost <= salvage) {
alert("Please enter valid positive numbers. Asset cost must be higher than salvage value.");
return;
}
var ddbRate = 2 / life;
document.getElementById('displayRate').innerText = (ddbRate * 100).toFixed(2) + "%";
var tableBody = document.getElementById('depreciationTableBody');
tableBody.innerHTML = "";
var currentBookValue = cost;
var accumulatedDepreciation = 0;
for (var year = 1; year <= life; year++) {
var openingValue = currentBookValue;
var depreciationExpense = openingValue * ddbRate;
// Ensure we don't depreciate below salvage value
if (openingValue – depreciationExpense < salvage) {
depreciationExpense = openingValue – salvage;
}
// If opening value is already at or below salvage, expense is 0
if (depreciationExpense < 0) depreciationExpense = 0;
currentBookValue = openingValue – depreciationExpense;
var row = tableBody.insertRow();
row.innerHTML = '
The Double Declining Balance (DDB) method is an accelerated depreciation technique that allocates a larger portion of an asset's cost to the early years of its useful life. This reflects the reality that many assets, such as vehicles and machinery, lose value most rapidly immediately after purchase.
How to Calculate the Double Declining Rate
To determine the rate, you first calculate the straight-line depreciation rate and then double it. The formula is as follows:
Double Declining Rate = 2 × (1 / Useful Life in Years)
Example Calculation
Suppose you purchase a piece of equipment for $50,000 with a useful life of 5 years and a salvage value of $5,000.
Straight-line Rate: 1 / 5 = 20% per year.
Double Declining Rate: 20% × 2 = 40% per year.
Year 1 Depreciation: $50,000 × 40% = $20,000.
Year 2 Depreciation: ($50,000 – $20,000) × 40% = $12,000.
The Salvage Value Rule
A critical rule in DDB depreciation is that the asset's book value cannot be depreciated below its salvage value. In the final years of the schedule, the depreciation expense may be adjusted (or "plugged") to ensure the closing book value exactly matches the estimated salvage value.
Why Use This Method?
Businesses often choose the double declining rate for tax advantages and matching principles. Since the depreciation expense is higher in the first few years, it reduces taxable income more significantly during the period when the asset is most productive and maintenance costs are typically lowest.