POST/v1/finance/loan1 credit / call
Loan payment calculator
Amortizing loan payment, total payment and total interest.
| Parameter | Type | Required | Description |
|---|
| principal | number | Yes | Loan amount. |
| annualRatePercent | number | Yes | Annual interest rate (%). |
| term | number | Yes | Loan term. |
| termUnit | string | No | years | months. Default: years. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/loan \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"principal":200000,"annualRatePercent":6,"term":30,"termUnit":"years"}'
Response
{
"ok": true,
"data": {
"monthlyPayment": 1199.1
}
}
POST/v1/finance/emi1 credit / call
EMI calculator
Equated monthly installment, total interest and total amount payable (same amortizing formula as finance/loan).
| Parameter | Type | Required | Description |
|---|
| principal | number | Yes | Loan amount. |
| annualRatePercent | number | Yes | Annual interest rate (%). |
| term | number | Yes | Loan term. |
| termUnit | string | No | years | months. Default: years. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/emi \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"principal":500000,"annualRatePercent":9,"term":60,"termUnit":"months"}'
Response
{
"ok": true,
"data": {
"emi": 10379.09
}
}
POST/v1/finance/simple-interest1 credit / call
Simple interest
Simple interest and total amount: SI = P x R x T / 100.
| Parameter | Type | Required | Description |
|---|
| principal | number | Yes | Principal amount. |
| annualRatePercent | number | Yes | Annual interest rate (%). |
| time | number | Yes | Time period. |
| timeUnit | string | No | years | months. Default: years. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/simple-interest \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"principal":1000,"annualRatePercent":5,"time":2}'
Response
{
"ok": true,
"data": {
"interest": 100,
"total": 1100
}
}
POST/v1/finance/compound-interest1 credit / call
Compound interest
Compound interest future value and total interest: A = P(1 + r/n)^(nt).
| Parameter | Type | Required | Description |
|---|
| principal | number | Yes | Principal amount. |
| annualRatePercent | number | Yes | Annual interest rate (%). |
| time | number | Yes | Time period. |
| timeUnit | string | No | years | months. Default: years. |
| frequency | string | No | annually | semiannually | quarterly | monthly | daily. Default: annually. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/compound-interest \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"principal":1000,"annualRatePercent":5,"time":10,"frequency":"monthly"}'
Response
{
"ok": true,
"data": {
"futureValue": 1647.01,
"interest": 647.01
}
}
POST/v1/finance/investment1 credit / call
Investment growth
Future value of an initial investment plus regular contributions, with total contributions and growth.
| Parameter | Type | Required | Description |
|---|
| initial | number | Yes | Initial investment amount. |
| contribution | number | Yes | Regular contribution amount. |
| contributionFrequency | string | No | monthly | quarterly | annually. Default: monthly. |
| annualReturnPercent | number | Yes | Expected annual return (%). |
| years | number | Yes | Investment period in years. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/investment \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"initial":1000,"contribution":100,"annualReturnPercent":7,"years":10}'
Response
{
"ok": true,
"data": {
"futureValue": 18415
}
}
POST/v1/finance/roi1 credit / call
Return on investment
ROI percentage and profit or loss from an initial investment and final value.
| Parameter | Type | Required | Description |
|---|
| initialInvestment | number | Yes | Initial investment amount. |
| finalValue | number | Yes | Final value. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/roi \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"initialInvestment":1000,"finalValue":1250}'
Response
{
"ok": true,
"data": {
"roiPercent": 25,
"profit": 250
}
}
POST/v1/finance/savings1 credit / call
Savings growth
Future value of a savings balance with regular contributions.
| Parameter | Type | Required | Description |
|---|
| startingBalance | number | Yes | Starting balance. |
| contribution | number | Yes | Regular contribution amount. |
| contributionFrequency | string | No | monthly | quarterly | annually. Default: monthly. |
| annualRatePercent | number | Yes | Annual interest rate (%). |
| years | number | Yes | Savings period in years. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/savings \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"startingBalance":5000,"contribution":200,"annualRatePercent":4,"years":5}'
Response
{
"ok": true,
"data": {
"futureValue": 18424
}
}
POST/v1/finance/mortgage1 credit / call
Mortgage calculator
Mortgage loan amount, monthly payment and totals, with optional property tax and insurance.
| Parameter | Type | Required | Description |
|---|
| homePrice | number | Yes | Home price. |
| downPayment | number | Yes | Down payment. |
| annualRatePercent | number | Yes | Annual interest rate (%). |
| termYears | number | Yes | Loan term in years. |
| annualPropertyTax | number | No | Annual property tax. Default: 0. |
| annualHomeInsurance | number | No | Annual home insurance. Default: 0. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/mortgage \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"homePrice":400000,"downPayment":80000,"annualRatePercent":6,"termYears":30}'
Response
{
"ok": true,
"data": {
"monthlyTotal": 1918.6
}
}
POST/v1/finance/amortization1 credit / call
Amortization schedule
Payment, totals and a principal/interest schedule (capped to 60 rows) for a loan.
| Parameter | Type | Required | Description |
|---|
| loanAmount | number | Yes | Loan amount. |
| annualRatePercent | number | Yes | Annual interest rate (%). |
| termYears | number | Yes | Loan term in years. |
| frequency | string | No | monthly | quarterly | annually. Default: monthly. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/amortization \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"loanAmount":100000,"annualRatePercent":5,"termYears":15}'
Response
{
"ok": true,
"data": {
"payment": 790.79,
"totalInterest": 42342
}
}
POST/v1/finance/interest-rate1 credit / call
Interest rate solver
Derive the nominal and effective annual interest rate from a principal, final amount, time and compounding frequency.
| Parameter | Type | Required | Description |
|---|
| principal | number | Yes | Starting principal. |
| finalAmount | number | Yes | Final amount. |
| time | number | Yes | Time period. |
| timeUnit | string | No | years | months. Default: years. |
| frequency | string | No | annually | semiannually | quarterly | monthly | daily. Default: annually. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/interest-rate \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"principal":1000,"finalAmount":1500,"time":5}'
Response
{
"ok": true,
"data": {
"nominalRatePercent": 8.45,
"effectiveRatePercent": 8.45
}
}
POST/v1/finance/discount1 credit / call
Discount calculator
Discount amount, final price and savings from an original price and discount percent.
| Parameter | Type | Required | Description |
|---|
| originalPrice | number | Yes | Original price. |
| discountPercent | number | Yes | Discount percentage (0-100). |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/discount \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"originalPrice":80,"discountPercent":25}'
Response
{
"ok": true,
"data": {
"discountAmount": 20,
"finalPrice": 60,
"saved": 20
}
}
POST/v1/finance/percentage-off1 credit / call
Percentage-off calculator
Amount off and final sale price for a price and percentage off (same math as finance/discount).
| Parameter | Type | Required | Description |
|---|
| price | number | Yes | Original price. |
| percentOff | number | Yes | Percentage off (0-100). |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/percentage-off \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"price":80,"percentOff":25}'
Response
{
"ok": true,
"data": {
"amountOff": 20,
"finalPrice": 60
}
}
POST/v1/finance/profit-margin1 credit / call
Profit margin calculator
Profit, profit margin percentage and markup percentage from revenue and cost.
| Parameter | Type | Required | Description |
|---|
| revenue | number | Yes | Revenue. |
| cost | number | Yes | Cost. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/profit-margin \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"revenue":150,"cost":100}'
Response
{
"ok": true,
"data": {
"profit": 50,
"marginPercent": 33.33,
"markupPercent": 50
}
}
POST/v1/finance/vat1 credit / call
VAT calculator
Add or remove VAT (or any percentage tax) from an amount: net, tax and gross.
| Parameter | Type | Required | Description |
|---|
| amount | number | Yes | Amount. |
| ratePercent | number | Yes | VAT rate (%). |
| mode | string | No | add | remove. Default: add. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/vat \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"amount":100,"ratePercent":20,"mode":"add"}'
Response
{
"ok": true,
"data": {
"netAmount": 100,
"taxAmount": 20,
"grossAmount": 120
}
}
POST/v1/finance/sales-tax1 credit / call
Sales tax calculator
Sales tax amount and total price for a price and tax rate.
| Parameter | Type | Required | Description |
|---|
| price | number | Yes | Price before tax. |
| ratePercent | number | Yes | Sales tax rate (%). |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/sales-tax \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"price":50,"ratePercent":8.5}'
Response
{
"ok": true,
"data": {
"taxAmount": 4.25,
"totalPrice": 54.25
}
}
POST/v1/finance/tip1 credit / call
Tip calculator
Tip amount, total bill and per-person split.
| Parameter | Type | Required | Description |
|---|
| billAmount | number | Yes | Bill amount. |
| tipPercent | number | Yes | Tip percentage. |
| people | number | No | Number of people splitting the bill. Default: 1. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/tip \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"billAmount":100,"tipPercent":18,"people":4}'
Response
{
"ok": true,
"data": {
"tipAmount": 18,
"totalBill": 118,
"perPerson": 29.5
}
}
POST/v1/finance/salary1 credit / call
Salary converter
Convert a salary across hourly, daily, weekly, monthly and annual pay periods.
| Parameter | Type | Required | Description |
|---|
| amount | number | Yes | Salary amount. |
| frequency | string | Yes | hourly | daily | weekly | monthly | annual. |
| hoursPerDay | number | No | Work hours per day. Default: 8. |
| daysPerWeek | number | No | Work days per week. Default: 5. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/salary \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"amount":60000,"frequency":"annual"}'
Response
{
"ok": true,
"data": {
"hourly": 28.85,
"monthly": 5000
}
}
POST/v1/finance/take-home1 credit / call
Take-home pay estimator
Estimate take-home pay from a gross salary, a deduction percentage and optional fixed deductions.
| Parameter | Type | Required | Description |
|---|
| grossSalary | number | Yes | Gross salary. |
| deductionPercent | number | Yes | Deduction percentage (0-100). |
| otherDeductions | number | No | Additional fixed deductions. Default: 0. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/take-home \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"grossSalary":60000,"deductionPercent":20}'
Response
{
"ok": true,
"data": {
"grossSalary": 60000,
"deductionAmount": 12000,
"takeHome": 48000
}
}
POST/v1/finance/debt-to-income1 credit / call
Debt-to-income ratio
DTI percentage and an interpretation band (lower | moderate | higher) from monthly income and debt.
| Parameter | Type | Required | Description |
|---|
| monthlyIncome | number | Yes | Gross monthly income. |
| monthlyDebt | number | Yes | Total monthly debt payments. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/debt-to-income \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"monthlyIncome":5000,"monthlyDebt":1500}'
Response
{
"ok": true,
"data": {
"dtiPercent": 30,
"category": "lower"
}
}
POST/v1/finance/retirement1 credit / call
Retirement savings estimator
Estimated retirement savings, contributions and investment growth from current age, retirement age, savings and monthly contribution.
| Parameter | Type | Required | Description |
|---|
| currentAge | number | Yes | Current age. |
| retirementAge | number | Yes | Target retirement age (must exceed current age). |
| currentSavings | number | Yes | Current retirement savings. |
| monthlyContribution | number | Yes | Monthly contribution. |
| annualReturnPercent | number | Yes | Expected annual return (%). |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/retirement \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"currentAge":30,"retirementAge":65,"currentSavings":20000,"monthlyContribution":500,"annualReturnPercent":7}'
Response
{
"ok": true,
"data": {
"futureSavings": 963000
}
}
POST/v1/finance/inflation1 credit / call
Inflation calculator
Future cost, purchasing power and total inflation from a current amount, inflation rate and number of years.
| Parameter | Type | Required | Description |
|---|
| currentAmount | number | Yes | Current amount. |
| inflationRate | number | Yes | Annual inflation rate (%). |
| years | number | Yes | Number of years. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/inflation \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"currentAmount":1000,"inflationRate":3,"years":10}'
Response
{
"ok": true,
"data": {
"futureCost": 1343.92
}
}
POST/v1/finance/invoice1 credit / call
Invoice totals calculator
Validate line items and calculate subtotal, fixed discount, tax and total; this endpoint does not render a document.
| Parameter | Type | Required | Description |
|---|
| items | string | Yes | JSON array of {description, quantity, unitPrice} objects. |
| taxRate | number | No | Tax percentage from 0 to 100. Default: 0. |
| discount | number | No | Fixed discount amount. Default: 0. |
Request
curl -X POST https://toolsonduty.com/api/v1/finance/invoice \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"items":"[{\"description\":\"Service\",\"quantity\":2,\"unitPrice\":50}]","taxRate":10}'
Response
{
"ok": true,
"data": {
"subtotal": 100,
"tax": 10,
"total": 110
}
}