{"openapi":"3.1.0","info":{"title":"Depreciation Calculator API","version":"1.0.0","description":"Asset-depreciation maths as an API, computed locally and deterministically, returning the full year-by-year schedule. The straight-line endpoint spreads the depreciable amount evenly, annual = (cost − salvage) / life, with the book value falling to the salvage value over the asset life. The declining-balance endpoint is accelerated — each year depreciates the current book value times factor/life (a factor of 2 is the double-declining method) — and it is capped so the book value never drops below salvage. The sum-of-years-digits endpoint is also accelerated, front-loading the expense: year t depreciates (remaining life / SYD) × (cost − salvage), where SYD = n(n+1)/2. Each method returns the depreciation, accumulated depreciation and book value for every year. Everything is computed locally and deterministically, so it is instant and private. Ideal for accounting, ERP, asset-management and bookkeeping app developers, fixed-asset registers, and finance dashboards. Pure local computation — no key, no third-party service, instant. Live, nothing stored. General accounting maths — tax rules such as MACRS differ by jurisdiction. 3 endpoints. This is asset depreciation; for NPV and IRR use a finance-calc API and for loans use a loan API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/depreciation-api","description":"oanor gateway"}],"tags":[{"name":"Depreciation"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/declining-balance":{"get":{"operationId":"get_v1_declining_balance","tags":["Depreciation"],"summary":"Declining-balance depreciation","description":"","parameters":[{"name":"cost","in":"query","required":true,"description":"Asset cost","schema":{"type":"string"},"example":"10000"},{"name":"salvage","in":"query","required":false,"description":"Salvage value (default 0)","schema":{"type":"string"},"example":"1000"},{"name":"life","in":"query","required":true,"description":"Useful life (years)","schema":{"type":"string"},"example":"5"},{"name":"factor","in":"query","required":false,"description":"Factor (2 = double-declining, default 2)","schema":{"type":"string"},"example":"2"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Declining-balance: each year depreciates book × (factor/life); factor 2 is double-declining. Capped so book value never drops below salvage.","inputs":{"cost":10000,"life":5,"factor":2,"salvage":1000},"method":"declining-balance","schedule":[{"year":1,"book_value":6000,"accumulated":4000,"depreciation":4000},{"year":2,"book_value":3600,"accumulated":6400,"depreciation":2400},{"year":3,"book_value":2160,"accumulated":7840,"depreciation":1440},{"year":4,"book_value":1296,"accumulated":8704,"depreciation":864},{"year":5,"book_value":1000,"accumulated":9000,"depreciation":296}],"depreciation_rate":0.4,"total_depreciation":9000},"meta":{"timestamp":"2026-06-04T18:38:16.197Z","request_id":"cf1fcfaa-0c96-42fc-84bf-b43de8720352"},"status":"ok","message":"Declining-balance","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/straight-line":{"get":{"operationId":"get_v1_straight_line","tags":["Depreciation"],"summary":"Straight-line depreciation","description":"","parameters":[{"name":"cost","in":"query","required":true,"description":"Asset cost","schema":{"type":"string"},"example":"10000"},{"name":"salvage","in":"query","required":false,"description":"Salvage value (default 0)","schema":{"type":"string"},"example":"1000"},{"name":"life","in":"query","required":true,"description":"Useful life (years)","schema":{"type":"string"},"example":"5"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Straight-line: equal annual depreciation = (cost − salvage) / life.","inputs":{"cost":10000,"life":5,"salvage":1000},"method":"straight-line","schedule":[{"year":1,"book_value":8200,"accumulated":1800,"depreciation":1800},{"year":2,"book_value":6400,"accumulated":3600,"depreciation":1800},{"year":3,"book_value":4600,"accumulated":5400,"depreciation":1800},{"year":4,"book_value":2800,"accumulated":7200,"depreciation":1800},{"year":5,"book_value":1000,"accumulated":9000,"depreciation":1800}],"total_depreciation":9000,"annual_depreciation":1800},"meta":{"timestamp":"2026-06-04T18:38:16.288Z","request_id":"bf9b00b2-7335-46f3-81bd-24e29cf4ed64"},"status":"ok","message":"Straight-line","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/sum-of-years":{"get":{"operationId":"get_v1_sum_of_years","tags":["Depreciation"],"summary":"Sum-of-years-digits depreciation","description":"","parameters":[{"name":"cost","in":"query","required":true,"description":"Asset cost","schema":{"type":"string"},"example":"10000"},{"name":"salvage","in":"query","required":false,"description":"Salvage value (default 0)","schema":{"type":"string"},"example":"1000"},{"name":"life","in":"query","required":true,"description":"Useful life (years)","schema":{"type":"string"},"example":"5"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"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}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Cost and salvage in any currency, life in whole years. Each endpoint returns the full depreciation schedule. Accounting estimate — tax rules (e.g. MACRS) differ by jurisdiction.","service":"depreciation-api","formulae":{"sum_of_years":"dep_t = (remaining_life / SYD) × (cost − salvage),  SYD = n(n+1)/2","straight_line":"annual = (cost − salvage) / life","declining_balance":"dep = book × (factor/life)"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/sum-of-years":"Sum-of-years-digits accelerated depreciation.","GET /v1/straight-line":"Equal annual depreciation and year-by-year book value.","GET /v1/declining-balance":"Accelerated declining-balance (double-declining by default), capped at salvage."},"description":"Asset-depreciation calculator with full schedules: straight-line, declining-balance and sum-of-years-digits."},"meta":{"timestamp":"2026-06-04T18:38:16.494Z","request_id":"d5be9887-3a2f-4351-9444-8184f396db16"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":2000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1400,"monthly_call_quota":20000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3900,"monthly_call_quota":150000,"rps_limit":25,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":11900,"monthly_call_quota":1000000,"rps_limit":80,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/depreciation-api"}