## Annual Cost

### Usage:

Calculate the depreciation schedule of things. Credit: Early Retirement Extreme by Jacob Lund Fisker https://a.co/4vgBczW### Args:

**cost:**original amount you paid.

**used_price:**amount you can sell it for.

**years_in_service:**number of years you've used it.

### Returns:

Cost per year.## Average Daily Spend

### Usage:

Calculate the average amount of money spent per day over a given number of days.### Args:

**money_spent:**the amount of money spent.

**num_days:**the number of days during which the spending occurred.

### Returns:

The amount of money spent per day.## Buy A Day Of Freedom

### Usage:

Calculate how much it costs to buy a day of freedom based on your annual spending habits and your safe withdrawl rate. Every time you save this amount of money, you've covered 1 more day. Once you have 365 days, you are financially independent. Credit: https://www.reddit.com/r/leanfire/comments/caka4t/weekly_leanfire_discussion_july_08_2019/etfdwg1/### Args:

**annual_spend:**the amount of money you plan to spend in retirement.

**safe_withdrawal_rate:**your planned safe withdrawl rate expressed as a whole percentage. Defaults to 4 for 4%.

### Returns:

The amount of money it costs to buy 1 day of freedom assuming the money is saved and invested.## Coast Fi

### Usage:

Calculate the amount of money you would need to "coast to FI" if you were to stop working but never touch your savings. Credit: eseligsohn https://www.reddit.com/r/financialindependence/comments/92d35t/what_is_this_coast_number_people_are_talking_about/e34uuxh/### Args:

**target_fi_num:**target FI number, the amount you'll need to invest in order to live off interest and dividends.

**eiar:**expected inflation adjusted return expressed as a whole percentage, e.g. 7 for 7%.

**retirement_age:**the age you want to retire.

**current_age:**your current age.

### Returns:

CoastFI number## Cost Of Costs

### Usage:

Calculate the "tyranny of compounding costs" as laid out by Jack Bogle on pages 47-49 of "The Little Book of Common Sense Investing". This is how much your investing expenses cost you over time. According to Jack Bogle there are three primary sources of costs: 1. The fund's expense ratio, 2. The sales charge paid on each purchase of shares (loads), and 3. The cost of the purchase and sale of securities within a fund (turnover costs). https://a.co/d/7mVz5Ud### Args:

**money_invested:**principal, dollar amount.

**interest_rate:**expected annual return expressed as a whole percentage.

**investment_costs:**annual investment costs expressed as a whole percentage. This could simply be a fund's expense ratio, however, more accurate input might include turnover costs, loads, and any other fees.

**time_period:**investing time horizon, how long the investment will be held, should be a number of years.

### Returns:

Dollar amount, how much your investment expenses costed (or will cost) you over the lifetime of an investment, the "tyranny of compounding costs".## Cost Per Use

### Usage:

Calculate how much something costed per use. Credit: Early Retirement Extreme by Jacob Lund Fisker https://a.co/4vgBczW### Args:

**your_cost:**amount paid.

**used_price:**amount you can sell it for.

**times_used:**number of times you've used it.

### Returns:

The amount something has costed per use.## Days Covered By Fi

### Usage:

Calculate the number of days per year that are currently covered by your savings. This is a way of seeing where you are on your FI journey. For example, 182.5 days would put you at 50% FI. 365 days would put you at 100% FI or full financial independence. Inspired by: https://www.reddit.com/r/leanfire/comments/caka4t/weekly_leanfire_discussion_july_08_2019/etfdwg1/### Args:

**annual_spend:**the amount of money you plan to spend in retirement.

**stash:**the amount of money you've saved.

**withdrawal_rate:**your planned safe withdrawl rate expressed as a whole percentage. Defaults to 4 for 4%.

### Returns:

The number of days covered by your stash. This is how many days you've already paid for with your savings and the amount of time you could theoretically take off every year if you wanted to.## Expected Gross Return

### Usage:

Model the expected gross nominal annual return of a stock and bond portfolio before investment costs, based on Jonh C. Bogle's forumla on p. 102-104 of "The Little Book of Common Sense Investing". https://a.co/d/7mVz5Ud### Args:

**expected_return_from_stocks:**expected stock market return expressed as a whole percentage (can be calculated with stock_returns).

**expected_bond_yield:**bond yield expressed as a whole percentage.

**percent_in_stocks:**percentage of the portfolio in stocks expressed as a whole percentage.

**percent_in_bonds:**percentage of the portfolio in bonds expressed as a whole percentage.

### Returns:

Expected return from a portfolio made up of stocks and bonds.## Fi Age

### Usage:

Calculate the age at which you will reach FIRE based on your current trajectory. Credit: eseligsohn https://www.reddit.com/r/financialindependence/comments/92d35t/what_is_this_coast_number_people_are_talking_about/e36titl/### Args:

**expected_inflation_adjusted_return:**Expected inflation adjusted return expressed as a whole percentage, e.g. 7 for 7%.

**annual_savings_amount:**annual savings amount, the amount of money you save towards FI each year.

**stash:**invested assests, the amount of money you have currently saved and invested for FI.

**fi_number:**the number you need to reach FI.

**current_age:**your current age.

### Returns:

FI age, int, the age at which you will FIRE based on your current habits.## Fi Number

### Usage:

Calculate your FI number based on your planned yearly expenses and withdrawal rate.### Args:

**planned_yearly_expenses:**the amount of money you think you will spend in retirement on an annual basis.

**withdrawal_rate:**the rate you expect to withdral money annually e.g. 4 (for 4%, based on the Trinity Study).

### Returns:

FI number.## Future Value

### Usage:

Calculates the future value of money invested at an interest rate, x times per year, for a given number of years. Can also be used to calculate the future equivalent of money due to inflation.### Args:

**present_value:**the current quantity of money (principal).

**annual_rate:**interest rate expressed as a whole percentage, e.g. 5 for 5%, the interest rate paid out.

**periods_per_year:**the number of times money is invested per year.

**years:**the number of years invested.

### Returns:

The future value of the money invested with compound interest.## Get Percentage

### Usage:

Calculate the percentage that one number is of another.### Args:

**a:**the lesser number.

**b:**the greater number that the lesser number is a percentage of.

**i:**bool, True if the user wants the result returned as a whole number.

**r:**bool, True if the user wants the result rounded. Rounds to the second decimal point.

### Returns:

Argument a as a percentage of b. Throws a warning if integer is set to True and round is set to False.## Hours Of Life Energy

### Usage:

Calculate the hours of life energy something costs by dividing money spent by your real hourly wage. From "Your Money or Your Life" by Vicki Robin and Joe Dominguez, Chapter 3, https://a.co/d/0fBQcbf### Args:

**money_spent:**int or float, the amount of money spent or price of something.

**real_hourly_wage:**float, the true amount of money you earn after adjustments have been made for work related expenses and additional work related time commitments, e.g. commuting, work clothes, time decompressing, etc.

### Returns:

Hours of life energy you spent to pay for the money spent.## Likely Real Return

### Usage:

Model the likely return of a portfolio using the relentless rules of humble artithmetic as explained by Jack Bogle on page 105 or "The Little Book of Common Sense Investing". https://a.co/d/7mVz5Ud### Args:

**nominal_gross_return:**expected gross return expressed as a whole percentage (can be calculated by expected_gross_return).

**investment_costs:**fees and investment costs expressed as a whole percentage.

**inflation:**inflation rate expressed as a whole percentage.

### Returns:

The likely real return of a portfolio after investing costs and inflation have been taken out.## Monthly Investment Income

### Usage:

Calculate how much monthly income you generate from your investments. From "Your Money or Your Life" by Vicki Robin and Joe Dominguez, Chapter 8, https://a.co/d/0fBQcbf### Args:

**stash:**your capital, the amount of money you have invested.

**current_interest_rate:**the interest rate your money earns expressed as a whole percentage, e.g. 4 for 4%, synonymous with safe withdrawal rate in this context.

### Returns:

Monthly investment income, the amount of money you can expect to make from your investments monthly.## Opportunity Cost

### Usage:

Calculate the opportunity cost of money you might spend. This is the amount of money you might earn at a given interest rate over a period of time (usually years) if the money were invested instead. From Chapter 4 of "The Simple Path to Wealth: Your road map to financial independence and a rich, free life" by JL Collins, https://a.co/d/9BMocT1### Args:

**cost:**price or cost of something you are thinking about buying or have bought.

**interest_rate:**the interest rate your money will likely earn if it were invested instead.

**time_period:**a given time period, normally a number of years.

### Returns:

Opportunity cost, the amount of money you might lose over a period of time by spending the money rather than investing it.## Percent Decrease

### Usage:

Calculate the percentage of loss from one number to another.### Args:

**original_value:**int or float, the starting number.

**final_value:**int or float, the final number after all losses.

### Returns:

The decrease from one number to another expressed as a percentage.## Percent Increase

### Usage:

Calculate the percentage of growth from one number to another.### Args:

**original_value:**int or float, the starting number.

**final_value:**int or float, the final number after all gains.

### Returns:

The increase from one number to another expressed as a percentage.## Percent Return For Percent

### Usage:

Calculate the percent of a potential return to attribute to a percentage of a portfolio. This function is used in modeling projected returns for portfolios of different asset classes.### Args:

**percent_return:**the expected percent return expressed as a whole percentage.

**percentage_of_portfolio:**the percentage of your portfolio that the return applies to.

### Returns:

Given a % return for an asset class, this function will return the percent returned for that asset class as it represents x% of a portfolio.## Pot Score

### Usage:

Calculate Pay-Over-Tuition to evaluate whether a degree is worth it to see how much you can expect to raise your annual earning power per dollar spent on a degree. Credit for this calculation goes to Kristy Shen and Bryce Leung https://a.co/d/6k3t1oH### Args:

**median_starting_salary:**the median annual starting salary for the job a given degree will pay in the state where you plan to live.

**hourly_minimum_wage:**the hourly minimum wage in the state where you plan to live.

**total_tuition_cost:**the total cost of tuition for a given degree.

### Returns:

Pay-Over-Tuition, a score for comparing degrees between various possible career paths. Though expressed as a decimal, the POT score correlates to money, e.g. a POT score of 1.3 will return $1.30 for every dollar spent on tuition, every year after graduation, assuming you earn an average salary in your chosen profession. Multiply the full cost of a degree (tuition) by the POT score to see how much money you will earn above minimum wage, per year, after graduation.## Real Hourly Wage

### Usage:

Calculate your real hourly wage by adjusting your money paid by subtracting auxiliary work related expenses (e.g. work clothes, cost of commuting, etc.) and by adjusting your hours worked by adding auxiliary work related time committments (e.g. time spent commuting, time spent decompressing, etc.). From "Your Money or Your Life" by Vicki Robin and Joe Dominguez, Chapter 2, https://a.co/d/0fBQcbf### Args:

**hours_worked:**the number of hours worked.

**money_paid:**how much you were paid.

**benefits:**the value of employer supplied benefits (401k match, health insurance, etc.).

**additional_work_related_hours:**additional time spent for work such as time commuting or time spent on escape entertainment after work.

**additional_work_related_expenses:**additional work related expenses such as the cost of commuting, lunches out, work clothes, etc.

### Returns:

Your real hourly wage adjusted for additional work related time commitments and additional work related expenses.## Redeem Chase Points

### Usage:

Calculates the value of Chase Ultimate Rewards points for different exchange scenarios. Based on the ChooseFI Sweet Redemption article: https://www.choosefi.com/travel-rewards-part-3-sweet-redemption/### Args:

**points:**number of Ultimate Rewards points to redeem.

### Returns:

A dictionary containing common Chase Ultimate Rewards redemption scenarios including cash value, Sapphire Preferred portal, Sapphire Reserve portal and target partner exchange (the guideline for direct transfer of points to Chase Ultimate Reward partners such as United Airlines). Target partner exchange is the aspirational goal for an exchange with a partner, not a guarantee.## Redeem Points

### Usage:

Calculates the value of travel rewards points based on a conversion rate. The default rate is 1% which is the cash value of awards points for most cards.### Args:

**points:**the number of awards points to be redeemed.

**rate:**defaults to 1 which is the exchange rate for most points to cash (1 cent per point).

### Returns:

Dollar amount the points are worth.## Remaining Life Expectancy

### Usage:

Calculate the amount of time you have left to live based on averages from the "United States Life Tables, 2013," National Vital Statistics Reports 66, no. 3 (2017): 1–64 which can be found at https://ftp.cdc.gov/pub/health_Statistics/nchs/publications/NVSR/66_03/Table01.xlsx This is the same data used in "Your Money or Your Life" by Vicki Robin and Joe Dominguez, Chapter 2, https://a.co/d/0fBQcbf which is the inspiration for this function.### Args:

**your_age:**int, your age.

**time_unit:**str, "hours", "days", "months", or "years".

**more_accurate:**bool, if True, will use 365.2425 as the length of a year instead of the proverbial 365 used by Vicki Robin and Joe Dominguez.

**exclude_time_asleep:**bool, if set to True, the function will assume you lose half your time to sleep and other mundane tasks.

### Returns:

The amount of time more on average that you are expected to live based on your current age, how much time you *might* have left.## Rule Of 72

### Usage:

Calculate the time it will take for money to double based on a given interest**rate:**Years to double = 72 / Interest Rate.

### Args:

**interest_rate:**float written as a whole percentage, e.g. 7 for 7%.

**accurate:**Boolean, when set to True the more accurate 69.3 is used instead of 72.

### Returns:

The number of years it will take for money to double based on an interest rate.## Savings Rate

### Usage:

Calculate your savings_rate based on take home pay and spending, using the formula laid out by Mr. Money Mustache: https://www.mrmoneymustache.com/2015/01/26/calculating-net-worth/### Args:

**take_home_pay:**monthly take-home pay.

**spending:**monthly spending.

### Returns:

your monthly savings rate expressed as a percentage.## Spending From Savings

### Usage:

Calculate your spending based on your take home pay and how much you save. This is useful if you use what Paula Pant calls the anti-budget, instead of tracking your spending in detail. This number can be used as input for the savings_rate function.### Args:

**take_home_pay:**monthly take-home pay.

**savings:**amount of money saved towards FI.

### Returns:

The amount of money spent.## Stock Returns

### Usage:

Model the expectation of stock returns for the next decade based on Jack Bogle's formula using the sources of stock returns presented on pages 97-105 of "The Little Book of Common Sense Investing". Bogle believes that stock returns come from stock dividends, earnings growth (tied to GDP) and swings in the P/E multiple (speculative return). Bond returns come from the interest a bond pays. https://a.co/d/7mVz5Ud### Args:

**dividend_yield:**percentage that stocks are currently yielding. Bogle used the S&P 500 or Total Stock Market Index.

**earnings_growth:**percentage you think stocks will grow per year. Bogle notes that this has typically been at the nominal growth rate of GDP (4-5% per year) which has a 0.98% correlation with corporate profits.

**change_in_pe:**negative or positive percentage of change in today's P/E multiple. This number represents the "speculative return".

### Returns:

The percentage you might expect to earn on an annual basis given the current state of the market. This number has no factual basis and is not a prediction. It should not be taken as a certainty or advice. It's just an educated guess based on common sense.## Take Home Pay

### Usage:

Calculate net take-home pay including employer retirement savings match using the formula laid out by Mr. Money Mustache: https://www.mrmoneymustache.com/2015/01/26/calculating-net-worth/### Args:

**gross_pay:**gross monthly pay.

**employer_match:**the 401(k) match from your employer.

**taxes_and_fees:**taxes and fees deducted from your paycheck.

### Returns:

Your monthly take-home pay.## Turnover Costs

### Usage:

Make an educated guess at the cost of portfolio turnover using the rule of thumb presented by Jack Bogle on page 55 of "The Little Book of Common Sense Investing". https://a.co/d/7mVz5Ud### Args:

**turnover_rate:**turnover rate of an index or mutual fund. This can normally be found with the normal characteristics and data on the fund's web page.