# API Reference


## Income


Foundations. Functions from the Income chapter.


[wealth_formula()](wealth_formula.md#perfinpy.wealth_formula)  
Wealth from saving part of an income every year.

[fixed_cost_ratio()](fixed_cost_ratio.md#perfinpy.fixed_cost_ratio)  
Fixed costs as a percent of take home pay.

[raise_invested_value()](raise_invested_value.md#perfinpy.raise_invested_value)  
Future value of investing part of a raise.


## Tracking Spending


Foundations. Functions from the Tracking Spending chapter.


[apply_rules()](apply_rules.md#perfinpy.apply_rules)  
Categorize transactions with keyword rules.

[subscription_opportunity_cost()](subscription_opportunity_cost.md#perfinpy.subscription_opportunity_cost)  
What a subscription would grow to if invested instead.


## Budgeting


Foundations. Functions from the Budgeting chapter.


[percent_of_income()](percent_of_income.md#perfinpy.percent_of_income)  
An expense as a percent of income.

[to_annual()](to_annual.md#perfinpy.to_annual)  
Convert a daily, weekly, or monthly amount to a yearly amount.

[to_monthly()](to_monthly.md#perfinpy.to_monthly)  
Convert a daily, weekly, or yearly amount to a monthly amount.

[opportunity_cost()](opportunity_cost.md#perfinpy.opportunity_cost)  
What an amount could grow to if invested instead of spent.

[months_to_break_even()](months_to_break_even.md#perfinpy.months_to_break_even)  
Months until monthly savings cover an upfront cost.


## Managing Debt


Foundations. Functions from the Managing Debt chapter.


[apr_to_apy()](apr_to_apy.md#perfinpy.apr_to_apy)  
Convert an APR to an annual percentage yield (APY).

[months_to_payoff()](months_to_payoff.md#perfinpy.months_to_payoff)  
Months to pay off a balance with a fixed payment.

[total_interest()](total_interest.md#perfinpy.total_interest)  
Total interest paid over the life of a loan.

[loan_income_ratio()](loan_income_ratio.md#perfinpy.loan_income_ratio)  
Total student loans as a multiple of expected starting salary.

[monthly_standard_payment()](monthly_standard_payment.md#perfinpy.monthly_standard_payment)  
Monthly payment on a standard student loan repayment plan.

[idr_monthly_payment()](idr_monthly_payment.md#perfinpy.idr_monthly_payment)  
Income driven repayment (IDR) monthly payment.

[dti_ratio()](dti_ratio.md#perfinpy.dti_ratio)  
Debt to income ratio.

[payoff_vs_invest()](payoff_vs_invest.md#perfinpy.payoff_vs_invest)  
Pay off a debt or invest the difference.

[order_avalanche()](order_avalanche.md#perfinpy.order_avalanche)  
Order debts for the avalanche method (highest APR first).

[order_snowball()](order_snowball.md#perfinpy.order_snowball)  
Order debts for the snowball method (smallest balance first).

[credit_utilization()](credit_utilization.md#perfinpy.credit_utilization)  
Credit utilization: a card balance as a percent of its limit.


## Emergency Fund


Foundations. Functions from the Emergency Fund chapter.


[emergency_fund_target()](emergency_fund_target.md#perfinpy.emergency_fund_target)  
Emergency fund target.

[months_to_ef_goal()](months_to_ef_goal.md#perfinpy.months_to_ef_goal)  
Months to reach an emergency fund target.

[monthly_contribution_needed()](monthly_contribution_needed.md#perfinpy.monthly_contribution_needed)  
Monthly contribution needed to reach an emergency fund target.

[ef_growth()](ef_growth.md#perfinpy.ef_growth)  
Emergency fund balance after earning interest.


## Savings Strategies


Savings. Functions from the Savings Strategies chapter.


[savings_rate()](savings_rate.md#perfinpy.savings_rate)  
Savings rate: the percent of income not spent.


## High-Yield Savings Accounts


Savings. Functions from the High-Yield Savings Accounts chapter.


[hysa_balance()](hysa_balance.md#perfinpy.hysa_balance)  
High-yield savings account balance.


## Automating Savings


Savings. Functions from the Automating Savings chapter.


[monthly_savings()](monthly_savings.md#perfinpy.monthly_savings)  
Monthly amount to pay yourself first.


## Investing Basics


Investing. Functions from the Investing Basics chapter.


[future_value()](future_value.md#perfinpy.future_value)  
Future value of a single amount with yearly compounding.

[rule_of_72()](rule_of_72.md#perfinpy.rule_of_72)  
Years for money to double, by the rule of 72.

[future_value_series()](future_value_series.md#perfinpy.future_value_series)  
Future value of a fixed contribution made every period.

[real_return()](real_return.md#perfinpy.real_return)  
Real (inflation adjusted) return.


## Retirement Accounts


Investing. Functions from the Retirement Accounts chapter.


[employer_match()](employer_match.md#perfinpy.employer_match)  
Yearly employer match on retirement contributions.

[after_tax_value()](after_tax_value.md#perfinpy.after_tax_value)  
After tax value of a retirement contribution.


## Index Funds


Investing. Functions from the Index Funds chapter.


[yearly_fee()](yearly_fee.md#perfinpy.yearly_fee)  
Yearly fund fee from an expense ratio.

[future_value_after_fees()](future_value_after_fees.md#perfinpy.future_value_after_fees)  
Future value of monthly contributions after fund fees.


## Asset Allocation


Investing. Functions from the Asset Allocation chapter.


[portfolio_return()](portfolio_return.md#perfinpy.portfolio_return)  
Return on a two fund (stock and bond) portfolio.

[rebalance_amount()](rebalance_amount.md#perfinpy.rebalance_amount)  
Amount to buy (positive) or sell (negative) to reach a target.


## Taxes


Taxes and insurance. Functions from the Taxes chapter.


[income_tax()](income_tax.md#perfinpy.income_tax)  
Federal income tax for a single filer (2026 brackets).

[raise_kept()](raise_kept.md#perfinpy.raise_kept)  
How much of a raise you keep after federal income tax.


## Insurance


Taxes and insurance. Functions from the Insurance chapter.


[break_even_years()](break_even_years.md#perfinpy.break_even_years)  
Years of premium savings to cover a higher deductible.

[plan_cost()](plan_cost.md#perfinpy.plan_cost)  
Yearly cost of a health plan.


## Financial Goals


Planning. Functions from the Financial Goals chapter.


[monthly_for_goal()](monthly_for_goal.md#perfinpy.monthly_for_goal)  
Monthly saving needed to reach a goal.

[months_to_fund()](months_to_fund.md#perfinpy.months_to_fund)  
Whole months to fund a goal with no interest.


## Major Purchases


Planning. Functions from the Major Purchases chapter.


[rent_buy_threshold()](rent_buy_threshold.md#perfinpy.rent_buy_threshold)  
Monthly rent that matches the unrecoverable cost of owning.

[mortgage_payment()](mortgage_payment.md#perfinpy.mortgage_payment)  
Monthly payment on a fixed rate loan.

[first_payment_split()](first_payment_split.md#perfinpy.first_payment_split)  
Interest and principal in a loan's first monthly payment.


## Estate Planning


Planning. Functions from the Estate Planning chapter.


[net_worth()](net_worth.md#perfinpy.net_worth)  
Net worth: total assets minus total debts.

[beneficiary_share()](beneficiary_share.md#perfinpy.beneficiary_share)  
Share of assets that pass directly to a named beneficiary.
