CodeCogs - An iteractive open source Numerical library Welcome... Login
CodeCogs
shopping cart
OSXWindowsLinux
Search CodeCogs
Numerical Components

Valid RSS

FinanceAccounting

deprec Straight

Available under GPL (Free) and Commercial licence
get a GPL licence
COST (GBP)
this unit 0.00
sub units 0.00
add a commercial licence to your cart
0
viewed 1527 times and licensed 9 times

Finance namespace

Controller: CodeCogs  Contact Controller
+View other versions (3)
Contents hide toc
buy now     get GPL     add to cart

Interface

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

using namespace Finance::Accounting;

double deprecStraight (double cost, double salvage, int life)
Calculate the straight-line depreciation of an asset. Excel: SLN
ExcelReal cc_accountingDeprecStraight (Real cost, Real salvage, Integer life)
This function is available as a Microsoft Excel add-in.

Function Documentation

Deprec Straight Calculator
  
Add calculator to website or email
 
doubledeprecStraightdoublecost
doublesalvage
intlife )
Calculate the straight-line depreciation of an asset. The following equation is used:
SLN=\frac{cost-salvage}{life}

Suppose you purchase a boat for £12000 that has a useful life of 20 years and a salvage value of £2000, the depreciation for each year is £500.
Example 1:
#include <iostream>
#include <codecogs/finance/accounting/deprecstraight.h>
 
int
main(int argc, char *argv[])
{
  printf("Depreciation of an asset purchased for 30000,");
  printf("and salvage for 7500 after 10 years is:\n");
  std::cout<<Finance::Accounting::deprecStraight(30000, 7500, 10);
  std::cout<<std::endl;
 
  return 0;
}
Output:
Depreciation of an asset purchased for 30000, and salvage for 7500 after 10 years is:
2250
Parameters:
costThe initial cost of the asset.
salvageThe value at the end of the depreciation.
lifeThe number of periods over which the asset is being depreciated, i.e. the useful life of the asset.
Returns:
The straight line depreciation of the asset.
Authors:
James Warren (July 2005)
Source Code:

To view or download source code you need either a GPL or Commercial Licence.

buy now     get GPL     add to cart

Not a member, then Register with CodeCogs. Already a Member, then Login.


Page Comments

Format Excel Equations

  You must login to leave a messge


Last Modified: 18 Oct 07 @ 17:07     Page Rendered: 2010-03-13 11:51:51

Valid CSS!   Valid XHTML 1.0 Transitional