DB Function (Gnumeric)
Use DB in Gnumeric for fixed-declining depreciation. Reproduce the three-decimal rate, partial first year and implementation-specific period safeguards.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =DB(10000,1000,5,1) has the reference result 3690 under the Gnumeric 1.12.62 implementation. The calculations here are source-derived checks, not observed native worksheet results.
Availability and version history
- Introduced: Implemented in Gnumeric 0.32. No exact release date is asserted here.
- Documented support: Registered in Gnumeric 1.12.62 in the Financial Functions plugin. No retirement is established.
- Last functioning version: Unverified for this guide. Source registration and independent arithmetic do not certify a running application version.
- Scope: English function names and comma-separated formulas. The cached source comes from the October 13–14, 2026 audit; the full guide and reference calculations were checked on October 15, 2026.
What DB calculates
DB calculates fixed-declining depreciation with a rounded rate. First it evaluates 1-(salvage/cost)^(1/life), then rounds that rate to three decimal places. The first charge is cost times the rounded rate times month/12. Later ordinary charges use the remaining balance times that same rounded rate. This rate rounding can leave a final balance different from the supplied salvage.
Function-specific help and complete worksheet callback establish the operation described here.
Syntax and arguments
=DB(cost,salvage,life,period[,month])
- cost: Initial cost; zero is rejected by this callback.
- salvage: Final value used to derive the declining rate.
- life: Positive useful life in years for the month convention shown here.
- period: Subject depreciation period; use positive integral schedule positions.
- month: Optional number of months in the first year; defaults to 12. Brackets indicate optional syntax.
The argument registration and callback were inspected together. A familiar function name in another spreadsheet is not a guarantee of the same input guards.
Reproducible worksheet
Use cost 10000 in B2, salvage 1000 in B3, life 5 in B4 and first-year months 12 in B5. Put periods 1 through 5 in A9:A13. In B9 enter =DB($B$2,$B$3,$B$4,A9,$B$5) and fill down. The unrounded rate is approximately 0.369042655520, but DB uses 0.369. The reference charges are 3690, 2328.39, 1469.21409, 927.07409079 and 584.98375128849.
Keep full precision in the formulas even if you display two decimal places. The five charges sum to 8999.66193207849 and leave 1000.33806792151. That remaining difference from 1000 follows from the function’s three-decimal rate, not an omitted period.
Formula checks
These are independently calculated expected results from the pinned callback, with repeating or irrational values rounded to twelve decimal places. Error labels follow explicit source guards. They are not screenshots or native execution results.
| Formula | Expected reference result |
|---|---|
=DB(10000,1000,5,1) |
3690 |
=DB(10000,1000,5,2) |
2328.39 |
=DB(10000,1000,5,3) |
1469.21409 |
=DB(10000,1000,5,4) |
927.07409079 |
=DB(10000,1000,5,5) |
584.98375128849 |
=DB(10000,1000,5,1,6) |
1845 |
=DB(10000,1000,5,6,6) |
238.527124587882 |
=DB(10000,1000,5,0) |
0 |
=DB(0,100,5,1) |
#NUM! |
=DB(10000,-100,5,1) |
#NUM! |
=DB(10000,1000,0,1) |
#NUM! |
Advanced application and cross-check
For a six-month first year, =DB(10000,1000,5,1,6) has the reference charge 1845. Subsequent full-period charges use the reduced book value. After the loop through the normal life, the callback returns a final partial-period charge multiplied by (12-month)/12. For this example period 6 has the reference value shown below.
This extra partial period is not the same as halving every yearly charge. Preserve the first-year month input in one cell and retain the full unrounded cumulative balance. Comparing a six-month and a twelve-month schedule is useful for spotting a copied formula that accidentally drops the optional argument and reverts to 12.
Errors, boundaries and troubleshooting
The callback explicitly rejects zero cost, nonpositive life and a negative salvage/cost ratio with #NUM!. It does not enforce all economically sensible restrictions. There is no explicit month range check or positive-integral period validation. For default month 12, a period that misses the loop’s matching branches can fall through to zero, including period 0. A zero output is therefore not proof that the requested period is meaningful.
Use integral life and periods, positive cost, an appropriate nonnegative salvage, and first-year months from 1 through 12 in an ordinary schedule. Salvage greater than cost can produce a negative rate, and negative cost with same-sign salvage is not rejected by the simple ratio guard. These are reasons to validate inputs separately, not suggested depreciation methods. Native handling of unusual coercions and extreme values remains unverified.
Use actual numeric input cells for this fixture. Native handling of blank cells, numeric text, application-localized formula entry and display formatting was not executed here. Keep missing values distinct from deliberately supplied zero; using ISNUMBER to inspect inputs can prevent a text-formatted amount from being mistaken for a verified numeric fixture. The tables do not claim a particular result for untested coercions.
Evidence and verification limits
This guide uses the official pinned Gnumeric 1.12.62 source and independent reference arithmetic. It does not claim native execution, GUI validation, current-release parity or cross-product equivalence. The cached source date and the editorial checking date above describe separate activities. For an operational workbook, compare a small copy of this fixture with the installed version before relying on an imported schedule.