financeaccounting

deprec Fixed Dec

Available under GPL (Free) and Commercial licence
get a GPL licence
COST (GBP)
this unit 2.70
sub units 0.24
add a commercial licence to your cart
0
viewed 1817 times and licensed 16 times
www.codecogs.com/d-ox/finance/accounting/deprecfixeddec.php
Other modules that are used by this module. We add these to the cart for you whenever you add this module, unless you already own enough licences for them. Click for details
Controller: will    Contact Controller

Interface

#include <codecogs/finance/accounting/deprecfixeddec.h>

using namespace Finance::Accounting;

double deprecFixedDec (double valCost, double valSalv, int life, int per, int month=12)
Return the depreciation for a specified period using the fixed-declining balance method. Excel: DB
Click for details on using CodeCogs in ExcelReal cc_deprecFixedDec (Real valCost, Real valSalv, Integer life, Integer per, Integer month)
This function is available as a Microsoft Excel add-in.

Function Documentation

Deprec Fixed Dec Calculator

  

Add calculator to your site or email
 
doubledeprecFixedDecdoublevalCost
doublevalSalv
intlife
intper
intmonth = 12 )
This function calculates the depreciation of an asset for a specified period. The method used is a fixed-declining method. This function is equivalent to the Microsoft Excel function DB. It works on the following set of equations:
(1)
\displaystyle rate = 1.0 - (\frac{salv}{cost})^{(\frac{1}{life})}

(2)
\displaystyle deprec = (cost-prevTot)*rate

With two special cases, when period=1:
(3)
\displaystyle deprec = cost*rate*\frac{month}{12}

When period=life:
(4)
\displaystyle deprec = (cost-prevTot)*rate*\frac{12-month}{12}

Where:

References:
http://www.vni.com/products/imsl/jmsl/v30/api/
Example:
#include <stdio.h>
#include <codecogs/finance/accounting/deprecfixeddec.h>
 
int main(void)
{
  double costVal=1000000;
  double salvVal=100000;
  
  printf("Consider an asset with the following terms:\n");
  printf("Cost\t\tSalvage\t\tLife\tPeriod\tMonth\tDepreciation\n");
 
  for (int per=1; per<=7; ++per) { 
    printf("%f\t%f\t6\t%i\t7\t%f\n",
           costVal,
           salvVal,
           per,
           Finance::Accounting::deprecFixedDec(costVal, salvVal, 6, per, 7));
  }
   
  printf("\n");
  costVal=2500;
  salvVal=500;
  for (int per=1; per<=4; ++per) { 
    printf("%f\t%f\t3\t%i\t6\t%f\n",
           costVal,
           salvVal,
           per,
           Finance::Accounting::deprecFixedDec(costVal, salvVal, 3, per, 6));
   }
  
   return 0;
}
Output:
Consider an asset with the following terms:
Cost            Salvage         Life    Period  Month   Depreciation
1000000.000000  100000.000000   6       1       7       186083.333333
1000000.000000  100000.000000   6       2       7       259639.416667
1000000.000000  100000.000000   6       3       7       176814.442750
1000000.000000  100000.000000   6       4       7       120410.635513
1000000.000000  100000.000000   6       5       7       81999.642784
1000000.000000  100000.000000   6       6       7       55841.756736
1000000.000000  100000.000000   6       7       7       15845.098474
 
2500.000000     500.000000      3       1       6       518.750000
2500.000000     500.000000      3       2       6       822.218750
2500.000000     500.000000      3       3       6       480.997969
2500.000000     500.000000      3       4       6       140.691906
Parameters:
valCostThe initial cost of the asset.
valSalvThe salvage value of the asset at the end of its life.
lifeThe is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).
perThe period for which you want to calculate the depreciation. per must have the same units as life.
monthThe number of months in the first year. This value defaults to 12.
Returns:
The depreciation for each accounting period.
Authors:
James Warren (August 2005)
Source Code:
Register

- To get code register with CodeCogs. Already a Member, then Login.


Last Modified: 18 Oct 07 @ 17:07     Page Rendered: 2008-05-14 19:24:19

Page Comments

  You must login to leave a messge


Valid CSS!   Valid XHTML 1.0 Transitional