APY to APR Calculator
Convert Annual Percentage Yield (APY) to Annual Percentage Rate (APR) and vice-versa with customizable compounding intervals.
Unlike conventional calculator sites that send your financial numbers, payload data, or code snippets across remote web servers, Affi-Chain processes all mathematical derivations, algorithms, and data parsing 100% locally within your browser sandbox. No tracking cookies, no server-side retention, and zero transmission lag.
What is APY vs. APR?
In personal finance, banking, and consumer lending, Annual Percentage Yield (APY) and Annual Percentage Rate (APR) calculate the annualized cost or return of capital. While frequently used interchangeably by consumers, they measure interest from fundamentally different mathematical baselines:
- Annual Percentage Rate (APR): The nominal, non-compounded annualized interest rate. APR reflects the simple interest rate charged on debt or credited to an account over a one-year period without factoring in the compounding effect of intra-year interest additions.
- Annual Percentage Yield (APY): Also known as the Effective Annual Rate (EAR), APY measures the true, compounded annual return or borrowing cost. It reflects the actual mathematical yield realized over a full year after accounting for how frequently interest is credited or added to the principal balance (annually, quarterly, monthly, or daily).
Because compounding always increases the effective yield, APY is mathematically greater than or equal to APR. Financial institutions deliberately exploit this difference in marketing: lenders advertise loans and credit cards using APR because the number appears smaller, while banks advertise high-yield savings accounts and Certificates of Deposit (CDs) using APY because the number appears larger.
Federal Regulatory Framework: TILA vs. TISA
To protect consumers from deceptive interest disclosures, the United States federal government codified strict presentation standards into federal law:
flowchart TD
Contract["Financial Contract Structure"] --> LawSplit{Is Capital Being Borrowed or Deposited?}
LawSplit -- "Consumer Credit & Borrowing" --> TILA["Truth in Lending Act (TILA / Regulation Z)"]
TILA --> MandateAPR["MANDATORY DISCLOSURE: Annual Percentage Rate (APR)"]
MandateAPR --> APRGoal["Prevents lenders from masking origination fees & points"]
LawSplit -- "Consumer Deposits & Savings" --> TISA["Truth in Savings Act (TISA / Regulation DD)"]
TISA --> MandateAPY["MANDATORY DISCLOSURE: Annual Percentage Yield (APY)"]
MandateAPY --> APYGoal["Forces banks to show true compound yield after daily/monthly crediting"]
- Truth in Lending Act (TILA / Regulation Z): Governs consumer debt products (mortgages, auto loans, credit cards). Lenders must prominently disclose the APR, which must incorporate upfront loan fees, origination points, and mandatory financing charges.
- Truth in Savings Act (TISA / Regulation DD): Governs deposit accounts (checking, savings, CDs). Banks are legally required to disclose the APY, reflecting the exact percentage yield a depositor will earn over 365 days with interest compounding.
The Conversion Mathematics: Formulas & Continuous Limits
The relationship between APY and APR depends strictly on the compounding frequency ($m$)—the number of compounding intervals per calendar year:
flowchart LR
NominalAPR["Nominal APR (r)"] --> Divide["Periodic Rate: r / m"]
Divide --> AddOne["Base: 1 + (r / m)"]
AddOne --> Exponent["Compound: [1 + (r / m)]^m"]
Exponent --> SubtractOne["Subtract 1 = Effective APY"]
EffectiveAPY["Effective APY"] --> Root["Root: (1 + APY)^(1 / m)"]
Root --> SubOne["Subtract 1"]
SubOne --> Multiply["Multiply by m = Nominal APR"]
1. Converting APR to APY (Discrete Compounding)
Given an annual nominal percentage rate ($\text{APR}$, expressed as a decimal $r = \frac{\text{APR}}{100}$) and compounding frequency $m$:
$$\text{APY} = \left(1 + \frac{r}{m}\right)^m - 1$$
To express APY as a percentage:
$$\text{APY } (%) = \left[ \left(1 + \frac{\text{APR}}{m \times 100}\right)^m - 1 \right] \times 100$$
2. Converting APY to APR (Inverting the Formula)
To solve for the underlying nominal APR required to produce a specific target APY:
$$r = m \times \left[ (1 + \text{APY})^{\frac{1}{m}} - 1 \right]$$
$$\text{APR } (%) = m \times \left[ \left(1 + \frac{\text{APY}}{100}\right)^{\frac{1}{m}} - 1 \right] \times 100$$
3. Continuous Compounding ($m \to \infty$)
As compounding frequency approaches infinity (continuous compounding governed by Euler's constant $e \approx 2.7182818$):
$$\text{APY}_{\text{continuous}} = e^r - 1$$
$$\text{APR}_{\text{continuous}} = \ln(1 + \text{APY})$$
Comprehensive APR to APY Compounding Multiplier Matrix
The table below demonstrates how an identical 10.00% nominal APR expands across different compounding intervals:
| Compounding Interval | Periods per Year ($m$) | Periodic Rate ($r/m$) | Effective Annual Yield (APY) | Extra Interest Earned on $100k (1 Yr) |
|---|---|---|---|---|
| Annual | 1 | 10.0000% | 10.0000% | $10,000.00 (Baseline) |
| Semi-Annual | 2 | 5.0000% | 10.2500% | $10,250.00 (+$250) |
| Quarterly | 4 | 2.5000% | 10.3813% | $10,381.29 (+$381) |
| Monthly | 12 | 0.8333% | 10.4713% | $10,471.31 (+$471) |
| Bi-Weekly | 26 | 0.3846% | 10.4961% | $10,496.09 (+$496) |
| Daily | 365 | 0.0274% | 10.5156% | $10,515.58 (+$516) |
| Continuous | $\infty$ | $\to 0$ | 10.5171% | $10,517.09 (+$517) |
Practical Implementation Examples
Python: Bidirectional APY / APR Conversion Engine
import math
from typing import Dict
def convert_interest_rates(
rate_value_pct: float,
mode: str = "apr_to_apy", # 'apr_to_apy' or 'apy_to_apr'
compounding_frequency: int = 12
) -> Dict[str, any]:
if rate_value_pct < 0:
raise ValueError("Interest rate cannot be negative.")
decimal_rate = rate_value_pct / 100.0
m = compounding_frequency
if mode.lower() == "apr_to_apy":
apr_pct = rate_value_pct
if m > 0:
# APY = (1 + r/m)^m - 1
apy_decimal = ((1.0 + (decimal_rate / m)) ** m) - 1.0
else:
# Continuous: APY = e^r - 1
apy_decimal = math.exp(decimal_rate) - 1.0
apy_pct = apy_decimal * 100.0
elif mode.lower() == "apy_to_apr":
apy_pct = rate_value_pct
if m > 0:
# APR = m * [(1 + APY)^(1/m) - 1]
apr_decimal = m * (((1.0 + decimal_rate) ** (1.0 / m)) - 1.0)
else:
# Continuous: APR = ln(1 + APY)
apr_decimal = math.log(1.0 + decimal_rate)
apr_pct = apr_decimal * 100.0
else:
raise ValueError("Mode must be 'apr_to_apy' or 'apy_to_apr'")
compounding_labels = {
1: "Annual (1x)",
2: "Semi-Annual (2x)",
4: "Quarterly (4x)",
12: "Monthly (12x)",
365: "Daily (365x)",
0: "Continuous"
}
return {
"nominal_apr": f"{apr_pct:.4f}%",
"effective_apy": f"{apy_pct:.4f}%",
"compounding_interval": compounding_labels.get(m, f"{m} periods/year"),
"compounding_spread_difference": f"{abs(apy_pct - apr_pct):.4f}%",
"annual_interest_on_10k": round(10000.0 * (apy_pct / 100.0), 2)
}
# Example: Credit Card charging 24.99% APR with daily compounding (365)
cc_audit = convert_interest_rates(24.99, mode="apr_to_apy", compounding_frequency=365)
print("Credit Card Real Debt Cost:")
for k, v in cc_audit.items():
print(f" {k.ljust(28)}: {v}")
# Example: CD offering 5.25% APY with monthly compounding
cd_audit = convert_interest_rates(5.25, mode="apy_to_apr", compounding_frequency=12)
print("\nCertificate of Deposit Nominal APR:")
for k, v in cd_audit.items():
print(f" {k.ljust(28)}: {v}")
TypeScript / JavaScript Implementation
export interface RateConversionResult {
aprPct: number;
apyPct: number;
differencePct: number;
}
export function aprToApy(aprPct: number, periodsPerYear: number): RateConversionResult {
const r = aprPct / 100;
const apy = Math.pow(1 + r / periodsPerYear, periodsPerYear) - 1;
const apyPct = apy * 100;
return {
aprPct: Math.round(aprPct * 1000) / 1000,
apyPct: Math.round(apyPct * 1000) / 1000,
differencePct: Math.round((apyPct - aprPct) * 1000) / 1000
};
}
export function apyToApr(apyPct: number, periodsPerYear: number): RateConversionResult {
const apy = apyPct / 100;
const apr = periodsPerYear * (Math.pow(1 + apy, 1 / periodsPerYear) - 1);
const aprPct = apr * 100;
return {
aprPct: Math.round(aprPct * 1000) / 1000,
apyPct: Math.round(apyPct * 1000) / 1000,
differencePct: Math.round((apyPct - aprPct) * 1000) / 1000
};
}
Critical Edge Cases & Common Financial Traps
1. The Credit Card Daily Compounding Squeeze
Credit card agreements disclose an APR (e.g. 24.99%). However, the contract fine print specifies Daily Compounding ($m = 365$): $$\text{True APY} = \left(1 + \frac{0.2499}{365}\right)^{365} - 1 = \mathbf{28.36%}$$ A cardholder carrying a $10,000 balance is not paying $2,499 in interest per year; they are paying $2,836 in real cash—an extra $337 extracted solely by daily compounding friction.
2. High-Yield Savings Account Daily Balance Method
Most online high-yield savings accounts compute interest using the Daily Balance Method (dividing the nominal rate by 365 or 360) and credit interest Monthly. If an account offers a 5.00% APY, depositing capital on the 2nd day of the month means your initial monthly interest payment will be slightly lower than $\frac{5.00%}{12}$ because interest accrued only for 29 days.
3. Leap Year Denominator Friction (365 vs. 366 Days)
During a 366-day leap year, banks using fixed 365-day formulas credit an extra day of interest, while banks that dynamically switch the daily divisor to 366 credit slightly less per day ($r / 366$). Over multi-million dollar corporate commercial paper balances, leap-year denominator differences alter yields by thousands of dollars.