Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Using the XIRR Function.

Using the XIRR Function

Written by Allen Wyatt (last updated October 20, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


In other issues of ExcelTips you discover how you can use the IRR function to calculate the internal rate of return for a series of values. Excel provides another function, XIRR, that is closely related to IRR. The XIRR function is used to determine the internal rate of return when there are a number of irregular payments associated with an investment.

By definition, an internal rate of return is the interest rate accrued on an investment consisting of a series of payments and income that occur over the life of the investment. The XIRR function is used to determine the IRR when the payments and income are made at different periods. In the values provided to the function, you enter payments you make as negative values and income you receive as positive values.

For instance, let's say you are investing in your friend's business, and you are providing the money ($50,000) on November 1. Because of the seasonal nature of your friend's business, the payments are scheduled for March 1, April 1, May 1, June 1, July 1, and August 1 for each of three years. During the first year, payments will be $3,500 each, during the second year they will be $4,250 each, and during the third year they will be $5,000 each.

Since the $50,000 is money you are paying out, it is entered in Excel as a negative value. The other values are entered as positive values. For instance, you could enter –50000 in cell D4, 3500 in cells D5 through D10, 4250 in cells D11 through D16, and 5000 in cells D17 through D22. Similarly, you would enter the dates of the payments in column C, just to the left of each exchange of money. To calculate the internal rate of return, you would use the following formula:

=XIRR(D4:D22,C4:C22)

The first range you specify with XIRR is the range of values (cash inflows and outflows) and the second range is the dates associated with those values. The function (in this instance) returns an internal rate of return of 31.21453%.

The ranges you use with the XIRR function must include at least one payment and one receipt. If you get a #NUM error and you have included payments and receipts in the range, then Excel needs more information to calculate the IRR. Specifically, you need to provide a "starting guess" for Excel to work with. For example:

=XIRR(D4:D22,C4:C22,10%)

This usage means that the XIRR function starts calculating at 10%, and then recursively attempts to resolve the XIRR based on the values in the ranges.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8970) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Using the XIRR Function.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Getting Context-Sensitive Help

Word employs what is called a context-sensitive help system. This means that the program tries to direct you to the ...

Discover More

Fonts in WordArt

Want to make sure that people can view your WordArt as you intended? Then you'll want to make sure that you follow these ...

Discover More

Checking for Incorrect Numbers in Text

Word's grammar checker can help you correct many of the more common errors that can crop up while writing. This includes ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Specifying Proper Case

If you need to change the case of letters in a cell, one of the functions you can use is the PROPER function. This tip ...

Discover More

Using the TRUNC Worksheet Function

Want to chop off everything after a certain point in a number? The TRUNC function can help with this need.

Discover More

Specifying a Date Range in a SUMIFS Formula

The SUMIFS function allows you to specify criteria by which values can be included in a sum. Putting together the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 + 5?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.