---
title: "Straight line or diminishing value depreciation, year by year"
method: POST
path: "/v1/depreciation"
tags: ["Calculators"]
---

# Straight line or diminishing value depreciation, year by year

`POST /v1/depreciation`

## Request

- Base URL: `https://api.calculate.co.nz`
- URL: `https://api.calculate.co.nz/v1/depreciation`
- Auth: API key in header `X-API-Key`

Depreciate an asset and show the working.

The two methods diverge sharply on the same asset. Straight line spreads the
deduction evenly across the useful life. Diminishing value applies the rate
to the reducing book value, so it front-loads the deduction heavily and
never reaches zero on its own. Which is better depends entirely on when the
owner wants the deduction, so the year by year `schedule` is the useful part
of this answer, not the first year figure.

`additional_costs` are capitalised into the cost base, which is where
delivery and installation belong. `salvage_value` acts as a floor under both
methods, and the last year of a straight line life takes only what is left,
so rounding cannot push the book value below it.

ONE IMPORTANT LIMIT. This is the arithmetic of the two methods. It is NOT a
lookup of Inland Revenue's prescribed rates, which vary by asset class and
are published in the IRD depreciation rate finder. Someone who needs to know
the right RATE for a particular asset needs that finder; this computes what
a given rate produces. Do not invent a rate to feed it.

## Request body

- DepreciationRequest
  - `initial_cost` number, required: Purchase price of the asset.
  - `method` 'straight_line' | 'diminishing_value': Which method to apply.
  - `additional_costs` number: Costs capitalised into the asset, such as delivery or installation.
  - `salvage_value` number: Expected residual value. Acts as a floor under both methods.
  - `useful_life_years` integer, nullable: Years of life. Required for straight line.
  - `annual_rate_pct` number, nullable: Rate per year as a percentage. Required for diminishing value.
  - `years_to_schedule` integer, nullable: How many years to show. Defaults to the useful life, or ten.

## Response `200`

The full schedule, the first year charge and the closing book value.

- DepreciationResponse
  - `result` DepreciationResult, required
    - `method` string, required: Method applied.
    - `total_cost` number, required: Purchase price plus capitalised costs.
    - `salvage_value` number, required: Residual value used.
    - `depreciable_amount` number, required: Cost less salvage.
    - `annual_rate_pct` number, nullable: Rate used, for diminishing value.
    - `useful_life_years` integer, nullable: Life used, for straight line.
    - `first_year_depreciation` number, required: Charge in year one.
    - `total_depreciation` number, required: Total charged over the schedule.
    - `final_book_value` number, required: Book value at the end of the schedule.
    - `schedule` DepreciationYearModel[], required: Year by year working.
      - `year` integer, required: Year number, starting at one.
      - `opening_value` number, required: Book value at the start of the year.
      - `depreciation` number, required: Charge for the year.
      - `closing_value` number, required: Book value at the end of the year.
      - `cumulative_depreciation` number, required: Total charged to date.
    - `inputs` object, required: The inputs used, with defaults filled in.
  - `disclaimer` string, required: Scope and limits of this calculation.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/calculate/apis/calculate-co-nz-api.md) · [All operations](https://skmtc.dev/calculate/apis/calculate-co-nz-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calculate/apis/calculate-co-nz-api/revisions/aa59a8e76614?raw)
