DB Function (LibreOffice Calc)
The DB function calculates depreciation for a period using the fixed-declining balance method. It is used in accounting, asset schedules, and financial modeling.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✔ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the DB Function Does â–¾
- Computes declining-balance depreciation for a given period
- Uses a constant rate based on asset life
- Supports partial first-year depreciation
- Useful for accounting, tax schedules, and asset modeling
Syntax â–¾
DB(cost; salvage; life; period; [month])
Arguments
-
cost:
Initial cost of the asset. -
salvage:
Value of the asset at the end of its life. -
life:
Number of periods (usually years). -
period:
The period for which depreciation is calculated. -
month (optional):
Number of months in the first year (default = 12).
Basic Examples â–¾
Standard declining-balance depreciation
=DB(10000; 1000; 5; 1)
→ depreciation for year 1
Depreciation for year 3
=DB(10000; 1000; 5; 3)
Partial first year (9 months)
=DB(10000; 1000; 5; 1; 9)
Advanced Examples â–¾
Build a full depreciation schedule
Year 1:
=DB($B$1; $B$2; $B$3; 1)
Year n:
=DB($B$1; $B$2; $B$3; ROW()-1)
Compute accumulated depreciation
=SUM(DB(cost; salvage; life; 1):DB(cost; salvage; life; period))
Compute book value after n periods
=cost - SUM(DB(cost; salvage; life; 1):DB(cost; salvage; life; n))
Compare DB vs SLN vs DDB
=DB(cost; salvage; life; p)
=SLN(cost; salvage; life)
=DDB(cost; salvage; life; p)
Use with VDB for variable-rate modeling
=VDB(cost; salvage; life; start; end)
Edge Cases and Behavior Details â–¾
DB returns a positive depreciation amount
Behavior details
- Depreciation rate = ( 1 - (salvage/cost)^{1/life} )
- First-year depreciation prorated if month < 12
- Period must be ≤ life
- Depreciation never goes below salvage value
- Errors propagate
Invalid inputs → Err:502
Common Errors and Fixes â–¾
Err:502 — Invalid argument
Cause:
- period < 1 or > life
- month < 1 or > 12
- cost ≤ 0
- salvage < 0
Fix:
- Validate period and month
- Ensure cost > salvage
Depreciation too small or too large
Cause:
- Misunderstanding of declining-balance rate
Fix:
- Compare with SLN or DDB to confirm method
Best Practices â–¾
- Use DB for tax-oriented declining-balance schedules
- Use DDB for accelerated depreciation
- Use SLN for straight-line schedules
- Use VDB when switching between methods
- Document assumptions (life, salvage, month) clearly
DB is ideal for modeling real-world asset depreciation where value declines faster in early years — a common accounting and tax requirement.
Related Patterns and Alternatives â–¾
- DDB — double-declining balance
- SLN — straight-line depreciation
- SYD — sum-of-years-digits
- VDB — variable declining balance
- FV / PV / RATE — financial structure functions
By mastering DB, you can build accurate, audit-ready depreciation schedules in LibreOffice Calc.