---
url: /cube-functions/ddb.md
description: >-
  Returns the depreciation of an asset for a specified period using the
  double-declining balance method or another declining-balance method that you
  specify.
---

# DDB&#x20;

Returns the depreciation of an asset for a specified period using the double-declining balance method or another declining-balance method that you specify.

```js
DDB(cost, salvage, life, period, factor)
```

#### Parameters

* `cost` - The initial cost of the asset.
* `salvage` - The value of the asset at the end of its useful life (salvage value).
* `life` - The number of periods over which the asset is depreciated (useful life).
* `period` - The period for which to calculate depreciation.
* `factor` - The rate factor for declining-balance depreciation. Defaults to 2 (double-declining balance). `(optional)`

#### Examples

```js
DDB(10000, 1000, 5, 1)

```

**Result:** `4000.0`

**Note:** First period with factor=2: 10000 × (2/5) = 4000.

```js
DDB(10000, 1000, 5, 2)

```

**Result:** `2400.0`

**Note:** Second period on remaining (6000 × 2/5) = 2400.

```js
DDB(10000, 1000, 5, 5)

```

**Result:** `296.0`

**Note:** Final period is capped so the value does not drop below the salvage value (1000).

```js
DDB(10000, 1000, 5, 1, 1.5)

```

**Result:** `3000.0`

**Note:** Custom factor example: 10000 × (1.5/5) = 3000 for period 1.
