The first is called "Straight Line Depreciation".

IBM 486 (1989 - 2007)
The formula is very straight forward. The formula is ((Cost - Salvage Value) / Life Of The System).
An example of this is that you have a $1500 rig with a salvage value of $375, and you've had it for two years.
Then you would calculate like this:
(($1500 - $375) / 2) = $562.5
Year 1 = $1500 - $562.5 = $937.5
To calculate the expense for year two you multiply the depreciation rate by the month of sale. If the sale month is October, that would be 10/12.
Year 2 = $562.5 * (10/12) = $468.75
$937.5 - $468.75 = $468.75
The second method is called "Declining balance depreciation".

Radio Shack Tandy Model TRS-80 (1977 - 1988)
For this method the formula is as follows:
Depreciation = Depreciation Rate x Book Value Of Asset
Depreciation Rate = Accelerator x Straight Line Rate
For this method say you build a PC worth $2000 and there's a 5 year shelf life with a salvage value of $525.
Straight Line Depreciation Rate = 1 / 5 = 0.20
Declining Balance = 0.20 x 2 = 0.40
Depreciation = 0.40 x $2000 = $800
Depreciation Rate = $2000 - $800 = $1200
With this method you can expect your rig to be worth $1200. The first method is more accurate, the second method is easier to compute and will give you a faster quote.
How to calculate the salvage value

Apple Power PC Performa 600 (1992 - 1996)
This directly ties into the first formula. It's also pretty simple if you know basic math. To calculate the salvage value:
S = P (1 - i) ^ y
P = Original Price
i = Depreciation Rate
y = Age in years
S = Salvage value
What's the salvage value of a system if it's originally priced at $2000, it depreciates at 35% annually, and it's owned for three years?
S = $2000 (1 - .35) ^ 3 = $549.25
So the salvage value of a $2000 rig with a three year life would be $549.25. But for accounting purposes, it would be rounded to the nearest whole dollar so $549.
Sources:

Antec SX-385 II (2002 - 2006)
- http://www.slideshare.net/matrixlab/salvage-value-calcu...
- http://accountingexplained.com/financial/non-current-as...
- http://accountingexplained.com/financial/non-current-as...
Related resources