# Thread: Excel function to calculate macrs

1. Member
Join Date
Nov 2008
Posts
1,185

## Excel function to calculate macrs

I am using Excel to maintain accounts for my company. I want to calculate the MACRS depreciation expense for 2008. My problem is that I don't know how to calculate in Excel. Is there any inbuilt function for calculating MACRS? Or some similar combination of functions which will give me the result?

2. Member
Join Date
Sep 2005
Posts
1,306

## Re: Excel function to calculate macrs

Although Excel do not have a function like MACRS(cost, class life, year), but they do have a function that when can be used to calculate the MACRS depreciation amounts. It is called variable declining balance (VDB) function.

Syntax
Code:
`=VDB (cost, salvage, life, start_period, end_period, factor, no_switch)`
where,

Cost is the initial cost of the asset.

Salvage is the value at the end of the depreciation (sometimes called the salvage value of the asset). This value can be 0.

Life is the number of periods over which the asset is depreciated (sometimes called the useful life of the asset).

Start_period is the starting period for which you want to calculate the depreciation. Start_period must use the same units as life.

End_period is the ending period for which you want to calculate the depreciation. End_period must use the same units as life.

Factor is the rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method). Change factor if you do not want to use the double-declining balance method. For a description of the double-declining balance method, see DDB.

No_switch is a logical value specifying whether to switch to straight-line depreciation when depreciation is greater than the declining balance calculation.

3. Member
Join Date
Jan 2008
Posts
1,521

## Re: Excel function to calculate macrs

You can even calculate MACRS using small java code:

Code:
```import com.imsl.finance.*;
import java.text.NumberFormat;

public class vdbEx1 {
public static void main(String args[]) {
double cost = 30000;
double salvage = 7000;
int life = 12;
int start = 5;
int end = 7;
double factor = 3.;
boolean no_sl = false;

double vdb = Finance.vdb(cost, salvage, life, start, end,
factor, no_sl);
System.out.println ("The depreciation allowance between the " +
"5th and 7th year is " + NumberFormat.getCurrencyInstance().format(vdb));
}
}```

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•