# VDB Function

> Calculate depreciation for any period with the variable declining balance method using VDB in TX Sheet Control: factor, no_switch, partial periods and errors.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > VDB Function
- **288 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/vdb/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/vdb/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/vdb/llms-full.txt

---

Return the depreciation of an asset for any period, including partial periods, with the double-declining balance method or another factor. `cost` is the initial cost, `salvage` the value at the end of the depreciation and `life` the number of periods; `start_period` and `end_period` set the periods to depreciate, in the same unit as `life`. `factor` is the rate at which the balance declines (2 when omitted). VDB switches to straight-line depreciation when that is greater, unless `no_switch` is TRUE. A negative cost, a start period after the end period or an end period after `life` returns `#NUM!`.

### Syntax

```text
VDB(cost, salvage, life, start_period, end_period, factor, no_switch)
```

Category: Financial. Minimum arguments: 5. Maximum arguments: 7.

Available for supported offline calculation.

### Examples

```text
=VDB(1000,100,5,0,2)
```

The formula returns 640, the depreciation of the first two of five years: 400 in the first year and 240 in the second.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [VAR.S Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/var-s/llms-full.txt)
- **Next:** [VLOOKUP Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/vlookup/llms-full.txt)
