Contact

VDB Function in ONLYOFFICE Spreadsheet Editor: Syntax and Examples

Financial Intermediate ONLYOFFICE Spreadsheet Editor

Calculate depreciation over a bounded period interval and compare declining-balance depreciation with its straight-line switch.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer

=VDB(1000,0,5,3,4) is expected to return 108, the fourth-period depreciation after switching to straight line. =VDB(1000,0,5,3,4,2,TRUE) is expected to return 86.4, keeping the declining-balance method instead.

VDB returns depreciation for an interval, not the asset’s remaining book value. Period numbering starts at zero: interval 0 to 1 is the first period, and 3 to 4 is the fourth.

Syntax and defaults

=VDB(cost, salvage, life, start_period, end_period, [factor], [no_switch])

The first five arguments are required. cost and salvage use the same monetary unit; life, start_period and end_period use the same time unit. The default factor is 2, corresponding to double declining balance. no_switch defaults to FALSE: the calculation may switch to straight line when that yields greater depreciation. TRUE disables that switch.

A factor of 2 is a multiplier, not a 2% rate. For life 5, the declining rate is 2/5 = 40% of the relevant declining balance. Omitting factor is also not the same as explicitly supplying an empty value: the inspected source uses factor 0 for an explicit empty argument. Supply 2 explicitly when passing a later flag and avoid ambiguous blank arguments.

Step-by-step: build the five-period schedule

  1. Put cost 1000 in B2, salvage 0 in B3 and life 5 in B4.
  2. Put starting periods 0, 1, 2, 3, 4 in A7:A11.
  3. Put corresponding ending periods 1, 2, 3, 4, 5 in B7:B11.
  4. In C7 enter =VDB($B$2,$B$3,$B$4,A7,B7,2,FALSE) and fill down.
  5. In D7 enter =VDB($B$2,$B$3,$B$4,A7,B7,2,TRUE) and fill down.
Interval Expected with switch Expected without switch
0–1 400 400
1–2 240 240
2–3 144 144
3–4 108 86.4
4–5 108 51.84
Total 1000 922.24

After three periods, the remaining balance is 216. Declining balance would take 40% of that, or 86.4. Straight line over the two remaining periods is 216/2 = 108, so the default method switches. The last two charges are 108 each.

Without the switch, the final balance is 77.76, not zero. A zero salvage input is a lower bound, not a promise that every declining-balance-only schedule fully depreciates the asset within its life.

Advanced use: intervals, partial periods and reconciliation

=VDB(1000,0,5,0,3) is expected to return 784, the sum of the first three charges. =VDB(1000,0,5,3,5) is expected to return 216 with the default switch; the TRUE version gives 138.24. Subtract accumulated depreciation from cost to calculate book value in a separate cell.

For a simple partial first period, =VDB(1000,0,5,0,0.5) is expected to return 200, half the first full-period charge of 400. Do not generalize this into arbitrary late-life prorating: the inspected implementation has additional handling for fractional starts in the latter half of life. The schedule above deliberately uses integer boundaries and the partial-period example stays at the beginning.

If life is measured in months, the interval boundaries must also be months. Changing units changes the per-period declining rate, so multiplying annual periods by 12 does not by itself establish an identical monthly depreciation convention. Choose and document the accounting model before changing the time unit.

Errors and implementation limits

The source rejects negative numeric inputs, factor below zero, start greater than end, or interval boundaries beyond life with #NUM!. A special all-zero life/start/end case returns #DIV/0!. Numeric and Boolean conversion errors can propagate. Ordinary models should use positive life and cost, with salvage between zero and cost.

The official help describes positive inputs, but the implementation permits several zeros. Conversely, it does not universally reject salvage above cost: a special branch may return zero or a negative adjustment. That is outside the ordinary depreciation model demonstrated here; do not depend on it to validate an asset register.

The implementation loops over periods. Use realistic, bounded lives and intervals; extremely large period counts can be impractical. No extreme-loop or stress-test result is claimed. These examples explain spreadsheet arithmetic, not tax eligibility, statutory depreciation rules or accounting-policy approval.

Availability and verification scope

Checked October 18, 2026 against the official VDB help and official SDKJS source tagged v10.0.0.169. Desktop Editors 10.0 was released October 13, 2026. The original introduction version for this individual function is not established; current help does not mark it retired or deprecated.

All results in this guide are expected values from documentation, source inspection and independent arithmetic, not application observations. Neither the application nor its calculation engine was used to test these examples. The tag matches the installed version/build designation but does not establish identical behavior in every older release, mobile client, server deployment or imported workbook. Examples use English names and comma argument separators; adapt separators to editor settings. These fictional calculations explain a function, not an investment or borrowing recommendation.