fin_value_CAGR: Calculate Compound Annual Growth Rate (CAGR)

View source: R/financial_functions.R

fin_value_CAGRR Documentation

Calculate Compound Annual Growth Rate (CAGR)

Description

Calculates the constant, period-over-period growth rate required for an investment to grow from a beginning value to an ending value over a specified number of periods.

The Compound Annual Growth Rate (CAGR) is computed as: CAGR = (End value/Start value)^(1/t) - 1

Where t is the number of years (periods).

Usage

fin_value_CAGR(beginningValue, endingValue, numYears, digits = 3)

Arguments

beginningValue

Starting value of investment

endingValue

Ending value of investment

numYears

Number of periods (e.g., years) elapsing from begin to end

digits

rounding the returned value (default = 3)

Value

A numeric value representing the Compound Annual Growth Rate as a decimal (e.g., 0.096 for 9.6%).

Note

This function includes input validation and will stop() with an error if any inputs are non-numeric or non-positive.

See Also

Other financial functions: fin_options_Greeks(), fin_options_LeapSimulate(), fin_options_plotGreeks(), fin_options_teach(), fin_stock_CAGR(), fin_stock_justifiedPE(), fin_stock_target(), fin_stock_ticker(), fin_stock_valuation(), fin_tax_FIF(), fin_tax_NI(), fin_value_CarryCost(), fin_value_NPV(), fin_value_interest(), fin_value_percent()

Examples

rate = fin_value_CAGR(beginningValue = 100, endingValue = 190, numYears = 7)
print(rate)

# --- Example with a Loss ---
fin_value_CAGR(100, 50, 5) 

# --- Formatting as Percentage ---
percent = paste0(round(rate * 100, 2), "%")
print(percent)

umx documentation built on Oct. 11, 2026, 5:07 p.m.