Introduction
In this article we will look how we can use "Microsoft.VisualBasic" namespace to do single line and double line depreciation calculation.
Other Articles of Financial Calculation
Future value calculation: - Click Here
Definition of Depreciation
Any asset we buy for an organization has a finite life time. As time passes by asset looses value. Depreciation helps us to evaluate the wear and tear for fixed assets over a period of time.
Understanding Single line depreciation
Straight line depreciation is the simplest and widely used technique. Below figure 'straight line depreciation' shows the complete formula for the same. Fixed cost asset is the total cost of the asset. Scrap value is the asset value when it will be finally sold or disposed. For instance let's say you have bought a computer and you use it for 5 years. Even after five years the computer will still sell for some amount. There is a possibility depending on asset that the scrap value can be zero. Life span of the asset is the total life time of the asset.

To calculate straight line depreciation we need to use the 'SLN' formulae. It takes three values the fixed cost which is termed as cost in excel , scrap value also called as salvage value and the life of the asset. This returns us depreciation calculation per month.

So for a asset of fixed cost 15000, scrap value of 2000 and life span of 5 years below is the spread and calculation.
| Years | First year | Second Year | Third Year | Fourth Year | Fifth Year |
| Depreciation Value | 2600 | 2600 | 2600 | 2600 | 2600 |
| Total Depreciation | 13000 | ||||
| Balance | 2000 | ||||
Understanding double declining depreciation
Double declining is type of acceleration depreciation method. Accelerated depreciation means it recognizes a higher depreciation at the beginning of the life time of the asset. First let's understand what declining appreciation is ?. Double declining depreciation value is twice the value of the straight line depreciation. In double declining previous years asset value becomes the input to the next year's depreciation calculation. Below figure 'Double declining balance' shows how calculations are done for every year. The basic formula for calculating depreciation is as below.
Depreciation expense = previous period value * ( Factor / Life of Asset )
From the above formula we will get depreciation expense on a per month basis. Previous period value is the value of the asset after deducting the depreciation of that year. Factor value is two for double declining depreciation. Life of asset is the life of the asset.
So let's analyze the below calculation for double declining balance. In the below example we have asset of cost around 19000 with scrap value of 2000 and life of the asset is five years. So the first year of calculation is fixed cost multiplied by factor divided by life of asset which comes to around 7600. Now to calculate for the second year we subtract the depreciation of the first year from the fixed cost and multiple by factor divided by life of asset. In the same way we carry forward for third and fourth year. Now for the fifth year we deduct the previous brought forward from the scrap value, because this is the final year of the life of asset. So for the final year the depreciation is 462. Try to follow the way carry forwards are taken from previous year to the next year this will clear your fundamentals in a more appropriate manner. 
The source code
Now lets see how we can achieve the above two things using the Financial class provided in 'Microsoft.VisualBasic' namespace.
First lets create a class which has the year and the value of the depreciation , below is the code for the same.


Konstantin TarkusPosted Mar 23, 2009, 2:37 PM
I would use F# for financial calculations which is better suited for this task, IMHO.