Savings & Deposit Calculator API
Compute term-deposit interest as Vietnamese banks pay it: at maturity, monthly or upfront, with rollover of principal or principal + interest, and monthly savings plans.
The savings calculator computes what a bank deposit earns. For a term deposit give the amount, the yearly rate and the term (term_months); interest can be paid at maturity (interest=end, lãi cuối kỳ), every month (monthly) or upfront (upfront, lãi trả trước, discounted as P·r·t / (1 + r·t)). Over a longer horizon (months) the deposit rolls over: with rollover=principal_interest interest is added to the principal at each renewal (compounding), with principal it is paid out.
For a regular savings plan (monthly_deposit, gửi góp) the API adds the deposit every month and compounds monthly. The response gives the total interest, the final balance, the total received and the effective annual yield, plus the schedule by period or by month, so offers with different terms and payment methods can be compared.
The calculation uses the simple monthly convention (rate / 12 × months). Banks count actual days (rate × days / 365), so real amounts can differ slightly; early withdrawal usually earns only the demand-deposit rate. Interest on bank deposits is exempt from personal income tax in Vietnam.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
amount | body|query | number | no | Initial deposit. | |
rate | body|query | number | yes | Yearly interest rate in %. | |
term_months | body|query | number | no | 12 | Term of the deposit (0 = demand). |
months | body|query | number | no | Total horizon in months (rollovers). | |
interest | body|query | string | no | end | end, monthly or upfront. |
rollover | body|query | string | no | principal_interest | principal_interest, principal or none. |
monthly_deposit | body|query | number | no | Regular monthly deposit (savings plan). |
Example
curl "https://apibox.io.vn/v1/savings-calc?amount=100000000&rate=6&term_months=6&months=24" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/savings-calc?amount=100000000&rate=6&term_months=6&months=24', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/savings-calc?amount=100000000&rate=6&term_months=6&months=24",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/savings-calc?amount=100000000&rate=6&term_months=6&months=24');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"mode": "term_deposit",
"amount": 100000000,
"rate": 6,
"term_months": 6,
"months": 24,
"interest_payment": "end",
"rollover": "principal_interest",
"total_interest": 12550881,
"interest_paid_out": 0,
"final_balance": 112550881,
"total_received": 112550881,
"effective_annual_yield": 6.09,
"tax_on_interest": 0,
"periods": [
{
"period": 1,
"from_month": 1,
"to_month": 6,
"principal": 100000000,
"interest": 3000000,
"paid_out": 0,
"balance": 103000000
},
"…"
],
"note": "Simple monthly convention …"
}
Use cases
- Savings calculators on bank and fintech websites
- Compare term deposit offers (end vs monthly vs upfront interest)
- Plan regular savings goals
- Personal finance apps and spreadsheets
FAQ
End of term or monthly interest?
Interest at maturity usually has a slightly higher rate and compounds when rolled over; monthly interest gives regular cash flow at a slightly lower rate.
How is upfront interest computed?
Paid at the start, it is discounted: P × r × t / (1 + r × t), so it is a bit less than the end-of-term amount at the same rate.
Is interest taxed?
No, interest on deposits at credit institutions is exempt from personal income tax in Vietnam.
Related APIs
JSON Validator
Check JSON syntax with exact line and column of errors, and validate data against a JSON Schema (draft 4, 7, 2019-09 or 2020-12).
{ }JSON Formatter
Pretty print JSON with 0-8 spaces or tabs, minify it, or sort object keys recursively. Syntax errors are reported with line and column.
CSVCSV to JSON
Convert CSV into an array of JSON objects using the header row, with delimiter auto-detection, number and boolean typing, and row-level errors.