Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

IRR Calculator (Internal Rate of Return from Cash Flows)

Enter the initial investment and the cash flow for each year starting from year 1 (the money received that year). The calculator finds the discount rate that makes NPV (net present value) exactly 0, which is the IRR (internal rate of return).

Enter amounts in dollars as plain numbers. Enter the initial investment as a positive amount (it is treated as a negative outflow). If you invested more in a later year, enter a negative amount for that year (for example, -50000); leave years with no money moving blank or 0. You can add rows with "Add a row" up to 20 years (20 years is enough for most investment decisions).
Result and graph
Enter the initial investment and the cash flow for each year on the left and press "Calculate". The result and a graph will appear here.

What you can do on this page

  • Enter the initial investment and the cash flow for each year (the money received that year), and get the IRR (internal rate of return, per year)
  • The investment period, total return (gain or loss over the whole period) and gross return are shown at the same time
  • The yearly amounts can all be different, and additional investments in later years (negative cash flows) are supported
  • A graph of NPV (net present value) shows at a glance where NPV becomes 0, which is the IRR
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
This page assumes one cash flow per year. For the rate of an investment with equal payments each period, "TVM Calculator" in the related pages (solving for I/Y) is handy. IRR here is a math calculation that does not include fees or taxes, and this page does not recommend any investment.

What is this calculation used for?

Deciding on an equipment investment (capital budgeting and the hurdle rate)

"If we install a $4,000,000 machine, we expect cost savings of $1,000,000, $2,000,000 and $3,000,000 over 3 years." With this estimate, the IRR is about 19.4% a year. In company investment decisions, the standard use is to compare this IRR with the minimum required return (the hurdle rate, such as the borrowing rate or the cost of capital) and accept the project if it is higher. Every corporate finance textbook covers it.
Future cash flows are only estimates, though, so it is good practice to also run the numbers with a cautious estimate.

Evaluating a rental property (yearly rent plus the final sale)

The money in a real estate investment flows like this: you buy the property first, rent comes in every year, and the sale price comes in at the end, so the yearly amounts are all different. IRR's strength is turning uneven cash flows like these into one yearly rate, and real estate investors widely use it to compare properties.
Unlike the gross yield (rent ÷ price), it also includes the gain or loss on the sale and years when vacancies cut the rent.

Checking whether solar panels or energy-saving equipment pay off

Home solar power has a cash flow that suits IRR: you pay for the installation first, then every year you save on your electric bill and may earn credits for power sent to the grid (such as net metering, where available). For example, if the installation costs $20,000, list the yearly savings and calculate the IRR, and you can compare the system with a savings account or an index fund on the same scale: "this equipment is like an investment returning X% a year".
The result changes when assumptions change, such as electricity rates, credit rules or the life of the equipment, so it is a good idea to calculate a few scenarios.

Measuring fund and M&A performance (finance careers)

For investment funds such as venture capital and private equity, IRR is the standard measure of fund performance. When money is called from investors and when it is paid back differs from fund to fund, so only IRR, which takes time into account, gives a fair comparison.
Investment banks and companies considering M&A (mergers and acquisitions) also calculate IRR from the purchase price and the future profit plan to decide whether to go ahead. It is one of the first calculations people learn when they aim for a career in finance.

Seeing in numbers that money returned sooner is worth more

Suppose investments A and B both cost $100,000 and both pay back $150,000 in total over 5 years (a total return of $50,000 and a gross return of 50%). A pays more early ($5,000, $20,000, $25,000, $40,000, $60,000), while B pays mostly at the end ($0, $10,000, $30,000, $30,000, $80,000).
The totals are the same, but A's IRR is 11.290% a year and B's is 10.259%, so A, which returns money sooner, comes out ahead. Money that comes back can be invested again. IRR shows you this time value of money in numbers.

Formulas and graphs

Turning money in \(t\) years into its value today (present value)
Graph
Standard notation (the usual math form)
\(PV\) \(=\) \(CF_t\) \(\div\) \((1+r)\) \(t\)
In words (symbols replaced with words)
④ \(PV\): present value \(=\) ① \(CF_t\): cash flow in year \(t\) \(\div\) ② discount factor for one year \((1+r)\) ③ \(t\): years
The formula in words
① Take the \(CF_t\): cash flow in year \(t\)
② and divide it by the discount factor for one year \((1+r)\) (\(r\) is the discount rate)
③ multiplied by itself once for each of the \(t\): years
④ and you get the \(PV\): present value
Quick example
At a 10% discount rate, the present value of $1,210,000 received in 2 years is (in units of $10,000)
\(PV\): present value \(=\) money in 2 years ($1,210,000) \(\div\) discount factor (1.1) years (2)
\(1.1 \times 1.1 = 1.21\)
\(121 \div 1.21 = 100\)
Key idea
If money can earn 10% a year, "$1,000,000 today" and "$1,210,000 in 2 years" are worth the same. Turning future money into what it is worth today is called discounting, and the yearly rate \(r\) used is called the discount rate. Money has a time value: this is the idea that IRR is built on.
Formula for NPV (net present value)
Figure
Standard notation (the usual math form)
\(\mathrm{NPV}\) \(=\) \(CF_0\) \(+\) \(\displaystyle\sum_{t=1}^{n} \dfrac{CF_t}{(1+r)^{t}}\)
In words (symbols replaced with words)
③ NPV: net present value \(=\) ① \(CF_0\): initial investment (a negative value) \(+\) ② sum of the present values of the cash flows from year 1 to year \(n\)
The formula in words
① To the \(CF_0\): initial investment (money paid, so it is negative)
② add the sum of the present values of each year's cash flow (each year's money turned into today's value with formula 1, then all added up)
③ and you get the NPV: net present value
Quick example
At a 10% discount rate, the NPV of an investment of $1,000,000 that returns $550,000 in year 1 and $605,000 in year 2 is (in units of $10,000)
NPV: net present value \(=\) initial investment (−$1,000,000) \(+\) sum of the present values of $550,000 and $605,000
\(55 \div 1.1 = 50\)
\(60.5 \div 1.21 = 50\)
\(-100 + 50 + 50 = 0\)
Key idea
NPV is what you get when you turn all the money in and out of an investment into today's value and add it up. If it is positive, the investment does better than earning the discount rate \(r\); if negative, worse; if exactly 0, exactly the same as earning \(r\). The NPV in the example is exactly 0 because this investment returns exactly 10% a year.
Definition of IRR (internal rate of return)
Graph
Standard notation (the usual math form)
\(\mathrm{NPV}(\mathrm{IRR})\) \(=\) \(0\)
In words (symbols replaced with words)
① NPV calculated with \(\mathrm{IRR}\) as the discount rate \(=\) ② exactly \(0\)
The formula in words
① The NPV calculated with \(\mathrm{IRR}\) as the discount rate
② is exactly \(0\) . The discount rate that makes this true is the internal rate of return, IRR, and it shows the return per year of the investment
Quick example
For the investment of $1,000,000 that returns $550,000 in year 1 and $605,000 in year 2, NPV is exactly 0 at a 10% discount rate, as in the example for formula 2, so
NPV (at a 10% discount rate) \(=\) exactly 0
\(\mathrm{IRR} = 0.10\ \ (10\%)\)
Key idea
This equation cannot be rearranged into the form \(\mathrm{IRR}=\cdots\) (it becomes an equation of degree \(n\)). Instead, a computer changes the discount rate \(r\) little by little, calculates NPV, and searches for where it becomes 0 (a numerical method). The calculator on this page solves it the same way. One caution: when the signs (plus and minus) of the cash flows change twice or more, for example "invest → receive → invest a large amount again", more than one discount rate can make NPV equal to 0 (the multiple IRR problem). In that case the calculator shows a note. For investments with multiple IRRs, the standard practice is to decide by NPV, not IRR.
Total return and gross return
Standard notation (the usual math form)
\(TR\) \(=\) \(S\) \(-\) \(C_0\)
\(G\) \(=\) \(TR\) \(\div\) \(C_0\)
In words (symbols replaced with words)
③ \(TR\): total return \(=\) ① \(S\): total money received \(-\) ② \(C_0\): initial investment
⑤ \(G\): gross return \(=\) \(TR\): total return \(\div\) ④ \(C_0\): initial investment
The formula in words
① From the \(S\): total money received
② subtract the \(C_0\): initial investment
③ to get the \(TR\): total return (the gain or loss over the whole period). Divide that again by the
④ \(C_0\): initial investment
⑤ and you get the \(G\): gross return (multiply by 100 to write it as a %)
Quick example
If you invest $4,000,000 and receive $1,000,000 in year 1, $2,000,000 in year 2 and $3,000,000 in year 3 (in units of $10,000)
\(TR\): total return \(=\) total received ($6,000,000) \(-\) initial investment ($4,000,000)
\(100 + 200 + 300 = 600\)
\(600 - 400 = 200\)
\(200 \div 400 = 0.5\ \ (50\%)\)
Key idea
Gross return is the % you gained compared with the investment over the whole period, and it ignores time. A 50% gain over 3 years and a 50% gain over 10 years are very different. IRR takes the time value into account and turns the result into a return per year, and it is the main value on this page. In fact, the gross return in this example is 50%, but the IRR is 19.438% a year.
IRR (internal rate of return) is the discount rate that makes NPV (net present value) exactly 0, which is the return per year of the investment. It cannot be solved by rearranging, so it is found numerically by changing the discount rate little by little. Even with the same total return, the sooner the money comes back, the higher the IRR.

Symbols and terms

Symbols

IRR I R R Internal rate of return. The discount rate that makes NPV exactly 0; it shows the return per year of the investment. (Example - invest $4,000,000 and receive $1,000,000, $2,000,000 and $3,000,000 over 3 years, and the IRR is 19.438% a year.)
NPV N P V Net present value. All the money in and out of an investment, turned into today's value and added up. If it is positive, the investment does better than the discount rate.
\(CF_t\) C F sub t The cash flow in year \(t\). The money received that year (negative if it was money paid).
\(CF_0\) C F sub zero The cash flow in year 0 (now). The initial investment is money paid, so it is negative. On this calculator you enter it as a positive amount, and it is treated as negative.
\(r\) r The discount rate. The yearly rate used to turn future money into today's value. IRR is the special \(r\) where NPV is 0.
\(t\) t The year number. It counts which year the money is in, with the time of the investment as year 0.
\(n\) n The investment period in years. The year of the last cash flow.
\(PV\) P V Present value. Future money turned into its value today.
\(S\) S The total money received. All the cash flows from year 1 to year \(n\) added up (additional investments are added as negative amounts).
\(TR\) T R Total return. The total received minus the initial investment, the gain or loss over the whole period.
\(G\) G Gross return. The total return as a % of the initial investment, a whole-period % that ignores time. Note that in the fund industry, "gross return" usually has a different meaning, the return before fees.

Terms

cash flow Money coming in or going out. Money received is a positive number and money paid is a negative number. For IRR, when and how much the money moves both matter.
discount rate The yearly rate used to turn future money into today's value (to discount it). For example, $110,000 one year from now, discounted at 10% a year, is $100,000 today.
present value What future money is worth today. Because money has a time value, the later you receive the same $1,000,000, the smaller its present value.
NPV (net present value) The sum of the present values of all the cash flows of an investment. A positive NPV says the investment earns more than the discount rate. It is the most basic yardstick for investment decisions.
IRR (internal rate of return) The discount rate that makes NPV exactly 0. It shows in one number what return per year the investment is equal to, so it is widely used to evaluate business projects and real estate.
hurdle rate The minimum return required from an investment (such as the cost of capital). In practice, a project is accepted if its IRR is above the hurdle rate.
multiple IRR problem A mathematical property - when the signs of the cash flows change twice or more, two or more discount rates can make NPV equal to 0. IRR alone cannot decide in that case, so you decide by NPV.
numerical method A way to solve an equation that cannot be solved by rearranging, where a computer tries values little by little and gets closer to the answer. IRR is found this way (bisection, Newton's method and others).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.

Percents (Grades 6–7)
  • Knowing that a percent is found as "part ÷ whole"
  • Being able to switch between decimals and percents, such as 0.5 and 50%
Positive and negative numbers (Grades 6–7)
  • Writing a payment (money going out) as a negative number
  • Adding positive and negative numbers together
Exponents (Grades 6–8)
  • Knowing that a power is repeated multiplication of the same number, as in \(1.1^2 = 1.1 \times 1.1\)
  • Having a feel that multiplying again and again by a number greater than 1 makes the answer keep growing
The idea of an equation (Grades 7–8)
  • Understanding an equation as a search for the value of a letter that makes both sides equal
  • Knowing that some equations cannot be solved by rearranging, and that you can then close in on the answer by trying values (a numerical method)
Compound interest and the time value of money (high school personal finance and math)
  • Knowing that money earning \(r\) a year grows \((1+r)\) times every year
  • Knowing that, the other way around, dividing future money by \((1+r)\) turns it into today's value (discounting and present value)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table for the present value of money in t years
Money received in t years ($) 110000
Discount rate (%) 10
Years t 1
Present value ($) =B1/(1+B2/100)^B3
Table for NPV (net present value)
Initial investment (enter as negative) -1000000
Cash flow in year 1 550000
Cash flow in year 2 605000
Discount rate (%) 10
NPV ($) =NPV(B4/100,B2:B3)+B1
Table for IRR (internal rate of return)
Initial investment (enter as negative) -4000000
Cash flow in year 1 1000000
Cash flow in year 2 2000000
Cash flow in year 3 3000000
IRR (%) =IRR(B1:B4)*100
Table for total return and gross return
Initial investment 4000000
Total money received 6000000
Total return ($) =B2-B1
Gross return (%) =(B2-B1)/B1*100
Excel has a function just for IRR. As in the third table, pass the list of cash flows, with the initial investment entered as negative, to "=IRR(B1:B4)", and you get about 19.438 (%) in the example.
The NPV function in the second table has a well-known trap. Excel's NPV function should include only the money from year 1 onward in its range; the initial investment (year 0) is added outside the function (the example gives exactly 0).
The first table gives exactly 100,000, and the fourth gives a total return of 2,000,000 and a gross return of 50%. Just replace column B with your own numbers.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table for the present value of money in t years
Money received in t years ($) 110000
Discount rate (%) 10
Years t 1
Present value ($) =B1/(1+B2/100)^B3
Table for NPV (net present value)
Initial investment (enter as negative) -1000000
Cash flow in year 1 550000
Cash flow in year 2 605000
Discount rate (%) 10
NPV ($) =NPV(B4/100,B2:B3)+B1
Table for IRR (internal rate of return)
Initial investment (enter as negative) -4000000
Cash flow in year 1 1000000
Cash flow in year 2 2000000
Cash flow in year 3 3000000
IRR (%) =IRR(B1:B4)*100
Table for total return and gross return
Initial investment 4000000
Total money received 6000000
Total return ($) =B2-B1
Gross return (%) =(B2-B1)/B1*100
The same formulas and the same IRR and NPV functions as in Excel work as is. Copy the whole table, paste it into cell A1, and replace column B with your own numbers.

How to calculate it in Python

initial_investment = 4000000                     # initial investment ($)
cash_flows = [1000000, 2000000, 3000000]         # cash flow for each year from year 1 ($)

# NPV (net present value): turn every cash flow into today's value and add them up
def npv(rate, cfs):
    return sum(cf / (1 + rate) ** t for t, cf in enumerate(cfs))

cfs = [-initial_investment] + cash_flows

# Find the discount rate where NPV is 0 (the IRR) by bisection
# (a simple version for ordinary investments whose signs change only once)
low, high = -0.9999, 10.0
for _ in range(200):
    mid = (low + high) / 2
    if npv(low, cfs) * npv(mid, cfs) <= 0:
        high = mid
    else:
        low = mid
irr = (low + high) / 2

total_return = sum(cash_flows) - initial_investment
gross_return = total_return / initial_investment * 100

print(f"IRR: {irr * 100:.3f}%")
print(f"Total return: ${total_return}")
print(f"Gross return: {gross_return:.3f}%")
Runs with the standard library only. IRR cannot be solved by rearranging, so it is found by bisection (a numerical method that cuts the range in half again and again to close in on the answer). Change the initial investment and the list of cash flows at the top and run it (the example gives 19.438%).

How to write it in LaTeX and other math languages (copy and paste)

Turning money in \(t\) years into its value today (present value)
PV = CFₜ ÷ (1 + r)ᵗ
PV = \dfrac{CF_t}{(1+r)^{t}}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>PV</mi>
    <mo>=</mo>
    <mfrac>
      <msub><mi>CF</mi><mi>t</mi></msub>
      <msup>
        <mrow><mo>(</mo><mn>1</mn><mo>+</mo><mi>r</mi><mo>)</mo></mrow>
        <mi>t</mi>
      </msup>
    </mfrac>
  </mrow>
</math>
PV = (CF_t) / ((1 + r)^t)
cf/(1 + r)^t
PV := cf/(1 + r)^t;
PV = cf/(1 + r)^t;
PV = CF_t/(1 + r)^t
Formula for NPV (net present value)
NPV = CF₀ + CF₁/(1 + r)¹ + … + CFₙ/(1 + r)ⁿ
\mathrm{NPV} = \sum_{t=0}^{n} \dfrac{CF_t}{(1+r)^{t}}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>NPV</mi>
    <mo>=</mo>
    <munderover>
      <mo>&#x2211;</mo>
      <mrow><mi>t</mi><mo>=</mo><mn>0</mn></mrow>
      <mi>n</mi>
    </munderover>
    <mfrac>
      <msub><mi>CF</mi><mi>t</mi></msub>
      <msup>
        <mrow><mo>(</mo><mn>1</mn><mo>+</mo><mi>r</mi><mo>)</mo></mrow>
        <mi>t</mi>
      </msup>
    </mfrac>
  </mrow>
</math>
NPV = sum_(t=0)^n (CF_t) / ((1 + r)^t)
Sum[cf[t]/(1 + r)^t, {t, 0, n}]
NPV := sum(cf(t)/(1 + r)^t, t = 0 .. n);
NPV = sum(cf ./ (1 + r).^(0:n));
NPV = ∑_(t=0)^n CF_t/(1 + r)^t
Definition of IRR (internal rate of return)
CF₀ + CF₁/(1 + IRR)¹ + … + CFₙ/(1 + IRR)ⁿ = 0
\sum_{t=0}^{n} \dfrac{CF_t}{(1+\mathrm{IRR})^{t}} = 0
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <munderover>
      <mo>&#x2211;</mo>
      <mrow><mi>t</mi><mo>=</mo><mn>0</mn></mrow>
      <mi>n</mi>
    </munderover>
    <mfrac>
      <msub><mi>CF</mi><mi>t</mi></msub>
      <msup>
        <mrow><mo>(</mo><mn>1</mn><mo>+</mo><mi>IRR</mi><mo>)</mo></mrow>
        <mi>t</mi>
      </msup>
    </mfrac>
    <mo>=</mo>
    <mn>0</mn>
  </mrow>
</math>
sum_(t=0)^n (CF_t) / ((1 + IRR)^t) = 0
Solve[Sum[cf[t]/(1 + x)^t, {t, 0, n}] == 0, x]
solve(sum(cf(t)/(1 + x)^t, t = 0 .. n) = 0, x);
solve(sum(cf ./ (1 + x).^(0:n)) == 0, x)
∑_(t=0)^n CF_t/(1 + IRR)^t = 0
Total return and gross return
G = (S − C₀) ÷ C₀
G = \dfrac{S - C_0}{C_0}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>G</mi>
    <mo>=</mo>
    <mfrac>
      <mrow><mi>S</mi><mo>&#x2212;</mo><msub><mi>C</mi><mn>0</mn></msub></mrow>
      <msub><mi>C</mi><mn>0</mn></msub>
    </mfrac>
  </mrow>
</math>
G = (S - C_0) / C_0
(s - c0)/c0
G := (s - c0)/c0;
G = (s - c0)/c0;
G = (S − C_0)/C_0

How to have ChatGPT  do the calculation

You are an investment calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

I invested $4,000,000 and received $1,000,000 in year 1, $2,000,000 in year 2 and $3,000,000 in year 3.
Find each of the following:
1. The IRR (internal rate of return, in %, to 3 decimal places) = the r that makes NPV(r) = -4000000 + 1000000/(1+r) + 2000000/(1+r)^2 + 3000000/(1+r)^3 equal to 0
2. The total return (in dollars)
3. The gross return (in %, to 3 decimal places)

Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.