Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. 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: Displaying a Number as Years and Months.

# Displaying a Number as Years and Months

by Allen Wyatt
(last updated January 6, 2018)

Robert has a formula that determines the payback period for certain investments. For instance, with \$20,000 investment in energy-savings equipment and an annual energy savings of \$3000, the simplistic payback period to recoup the investment is 6.6667 years. Robert wonders how he can make this payback period (6.6667) show as years and months instead of as a decimal number.

This can be done by simply multiplying the portion of the answer at the right of the decimal point by 12, which results in a number of months. Here is one way to get the desired result, assuming that the payback result is in cell A1:

```=INT(A1) & " years / " & INT((A1-INT(A1))*12) & " months"
```

With the value 6.6667 in cell A1, the formula would return “6 years / 8 months”.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12485) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Displaying a Number as Years and Months.

##### 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

Specifying a Number of Matches

The wild card searching capabilities of Word are amazing. One thing you can do with wild cards is to specify not only a ...

Discover More

Navigating a Collection of Selected Items

Word allows you to easily select portions of a document that meet differing criteria that you may specify. If you want to ...

Discover More

Determining the Size of a File

When processing a document using a macro, you may need to know the precise size of a particular file. The way you figure ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

##### More ExcelTips (ribbon)

Converting an Unsupported Date Format

Excel makes it easy to import information created in other programs. Converting the imported data into something you can ...

Discover More

Converting UNIX Date/Time Stamps

If you import information generated on a UNIX system, you may need to figure out how to change the date/time stamps to ...

Discover More

Years in Which a Date Occurred on a Particular Day

If you need to know the years in which a particular date occurred on a specific day of the week, there are a number of ...

Discover More
##### Subscribe

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

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}] 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 six more than 7?

2018-03-20 08:32:07

Dave Shepherd

This example should use ROUNDUP function for months section as payback is calculated in full month; INT always rounds down, it basically works the same way as ROUNDDOWN(A1,0). This also would fix the negative issue if you replace all of the INTs with ROUNDDOWN, ROUND or ROUNDUP as appropriate

If you need completed months only
=INT(A1) & " years / " & INT((A1-INT(A1))*12) & " months"

If you need to nearest months
=INT(A1) & " years / " & ROUND((A1-INT(A1))*12,0) & " months"

If you need to count part month as complete month (as in the example given)
=INT(A1) & " years / " & ROUNDUP((A1-INT(A1))*12,0) & " months"

2018-02-18 06:27:37

Willy Vanhaelen

@DREW
You are right, months are not in tenths but the formula doesn't do that. Try with 6.92 and you get 6 years / 11 months. So the formula is all right BUT ONLY FOR POSITIVE NUMBERS. For positive as well as negative numbers use this formula:

=TRUNC(A1) & " years / " & TRUNC((A1-TRUNC(A1))*12) & " months"

2018-02-17 17:09:31

DREW

NO. THIS WRONG! MONTHS ARE NOT IN TENTHS!

##### 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.