Skip to content
GET /v1/sum-of-years

Sum-of-years-digits depreciation

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/depreciation-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/depreciation-api/v1/sum-of-years" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/depreciation-api/v1/sum-of-years", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/depreciation-api/v1/sum-of-years");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/depreciation-api/v1/sum-of-years",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "note": "Sum-of-years-digits: year t depreciates (remaining_life / SYD) × (cost − salvage); SYD = n(n+1)/2. Accelerated, early-loaded.",
        "inputs": {
            "cost": 10000,
            "life": 5,
            "salvage": 1000
        },
        "method": "sum-of-years-digits",
        "schedule": [
            {
                "year": 1,
                "book_value": 7000,
                "accumulated": 3000,
                "depreciation": 3000
            },
            {
                "year": 2,
                "book_value": 4600,
                "accumulated": 5400,
                "depreciation": 2400
            },
            {
                "year": 3,
                "book_value": 2800,
                "accumulated": 7200,
                "depreciation": 1800
            },
            {
                "year": 4,
                "book_value": 1600,
                "accumulated": 8400,
                "depreciation": 1200
            },
            {
                "year": 5,
                "book_value": 1000,
                "accumulated": 9000,
                "depreciation": 600
            }
        ],
        "total_depreciation": 9000,
        "sum_of_years_digits": 15
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:16.424Z",
        "request_id": "f4c51e40-f873-4d6f-885e-3d85456e6505"
    },
    "status": "ok",
    "message": "Sum-of-years-digits",
    "success": true
}