Rate nominal effective convert
rate-nominal-effective-convert · version 1.0.0 · Financial calculations · free, no key needed
Convert an interest rate between nominal (periodic compounding), effective annual and continuous compounding forms.
Use when you need to: nominal to effective annual rate · APR to APY conversion · effective annual rate from stated rate.
Decide before calling
Read the versioned contract and the supported scope below. Reuse rate-nominal-effective-convert@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use rate-nominal-effective-convert@1.0.0 for nominal to effective annual rate. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- nominal to effective annual rate
- APR to APY conversion
- effective annual rate from stated rate
- convert monthly compounded rate to annual effective
- continuous compounding rate equivalent
- effective rate to nominal rate
- compare rates with different compounding
- EAR of a nominal rate compounded quarterly
- המרת ריבית נומינלית לריבית אפקטיבית שנתית
Not supported
- solving a rate from a payment stream, fees or a loan (use loan-apr-compute)
- accruing interest on an amount over a term (use interest-accrual-compute)
- inflation adjustment or real rates
- percent-formatted input such as "5%"
Behavior
- rate is a decimal fraction string (0.08 means 8 percent; "8" means 800 percent) with -1 < rate <= 10, at most 20 integer and 20 fractional digits. A JSON number, percent sign or exponent form is invalid_input.
- from_compounding says what rate means: an integer m from 1 to 365 (a nominal annual rate compounded m times a year), "continuous", or "effective" (an effective annual rate, the same as m = 1). to_compounding takes the same values and names the requested form; both are required.
- The conversion goes through the exact effective annual rate: EAR = (1 + rate/m)^m - 1 for integer m (exact rational arithmetic), e^rate - 1 for continuous, rate for effective. Target form: m * ((1 + EAR)^(1/m) - 1) for integer m, ln(1 + EAR) for continuous, EAR for effective.
- Outputs: rate (in the to_compounding form), effective_annual_rate (EAR) and continuous_rate (ln(1 + EAR), 0 when EAR is 0), each rounded once from the exact value to rate_scale fractional digits. Same-form conversions return the input rounded exactly. Defaults when omitted: rate_scale 10, rounding half-up (half away from zero); the other modes are half-even, half-down, up, down, ceiling, floor. Outputs never contain -0.
- Roots, exponentials and logarithms use a 40-digit BigInt engine accurate to better than 1e-35 relative before the final rounding.
- Any string input over 64 UTF-8 bytes is limit_exceeded, checked before parsing; a lone surrogate is invalid_input.
- Disclaimer: arithmetic calculation only; not financial, tax, legal, or investment advice.
Input
rate(string, required): max length 64; pattern^-?(0|[1-9][0-9]*)(\.[0-9]+)?$from_compounding(integer or one of "continuous", "effective", required)to_compounding(integer or one of "continuous", "effective", required)rate_scale(integer, optional): min 0; max 12rounding(one of "half-up", "half-even", "half-down", "up", "down", "ceiling", "floor", optional)
Output
rate(string, required): max length 64; pattern^-?(0|[1-9][0-9]*)(\.[0-9]+)?$effective_annual_rate(string, required): max length 64; pattern^-?(0|[1-9][0-9]*)(\.[0-9]+)?$continuous_rate(string, required): max length 64; pattern^-?(0|[1-9][0-9]*)(\.[0-9]+)?$
Limits
- max string bytes: 64
Example
Request input:
{
"rate": "0.0525",
"from_compounding": 4,
"to_compounding": "effective",
"rate_scale": 6
}
Response:
{
"result": {
"rate": "0.053543",
"effective_annual_rate": "0.053543",
"continuous_rate": "0.052158"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "rate-nominal-effective-convert",
"version": "1.0.0",
"input": {
"rate": "0.0525",
"from_compounding": 4,
"to_compounding": "effective",
"rate_scale": 6
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/rate-nominal-effective-convert/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"rate":"0.0525","from_compounding":4,"to_compounding":"effective","rate_scale":6}'
The machine-readable contract is at /v1/tools/rate-nominal-effective-convert/versions/1.0.0.
CLI
node cli.mjs run rate-nominal-effective-convert 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Loan apr compute: APR of an equal-payment loan net of prepaid fees under US Reg Z or the EU consumer credit directive.
- Interest accrual compute: Simple or compound (periodic or continuous) interest over a term in years or a dated span with a day-count basis.
- Tbill yield convert: Convert a Treasury bill price, discount rate, investment rate or money-market yield into all four (31 CFR 356 App. B).
- Bond price from yield: Clean price, dirty price and accrued interest per 100 of a fixed-coupon bond from its yield (Excel PRICE, SIA).
- Cashflow mirr: MIRR of periodic cash flows from a finance rate and a reinvestment rate, with compounded and discounted totals.
- Cashflow xnpv: NPV of dated cash flows with the Excel XNPV 365-day exponent and an explicit valuation date.