| Line 7: |
Line 7: |
| | ==Description== | | ==Description== |
| | *This function gives the depreciation of an asset for a given time period based on the sum-of-years digits depreciation method. | | *This function gives the depreciation of an asset for a given time period based on the sum-of-years digits depreciation method. |
| − | *In SYD(c,s,l,p), c is the original cost of the asset. | + | *In <math>SYD(c,s,l,p)</math>, <math>c</math> is the original cost of the asset. |
| − | *s is the salvage value after the asset has been fully depreciated. | + | *<math>s</math> is the salvage value after the asset has been fully depreciated. |
| − | *l is the useful life of the asset or the number of periods that you will be depreciating the asset, p is the period that you wish to calculate the depreciation for. | + | *<math>l</math> is the useful life of the asset or the number of periods that you will be depreciating the asset, <math>p</math> is the period that you wish to calculate the depreciation for. |
| | *SYD is calculated as follows: | | *SYD is calculated as follows: |
| | <math>SYD = \frac{(c-s)*(l-p+1)*2}{(l)(l+1)}</math> | | <math>SYD = \frac{(c-s)*(l-p+1)*2}{(l)(l+1)}</math> |
| | where <math>c</math> is the cost,<math>s</math> is the salvage,<math>p</math> is the period and <math>l</math> is the life. | | where <math>c</math> is the cost,<math>s</math> is the salvage,<math>p</math> is the period and <math>l</math> is the life. |
| | *This function will give the result as error when | | *This function will give the result as error when |
| − | 1. Any one of the argument is nonnumeric. | + | 1.Any one of the argument is nonnumeric. |
| | 2.s<0 | | 2.s<0 |
| | 3.l or p<=0 | | 3.l or p<=0 |