This post is part of spreadcheats series.
Today we will learn a fascinating little feature in excel called “goal seek”.
But what good is a feature if we cant find a use for it? So we will build a simple retirement calculator using excel.
Before plunging in to the complex retirement calculations, let us spend a bunch of words understanding what this goal seek is all about.
What is goal seek in excel?
We can think of goal seek as opposite of formulas. Formulas tell you what is the output of a bunch of variables used in an equation (for eg. sumproduct is an equation involving + and *). Goal seek tells you what inputs you need to give in order to get certain output.
For example, you can use goal seek to solve a linear equation or find the internal return rate (IRR) of an investment.
Now that you understand goal seek, let us plan your retirement. 🙂
Make a financial model to estimate your monthly savings to meet retirement goals.

(Note: the image shows commas according to Indian currency formatting.)
In order to proceed, we would need some data, like,
(1) What is your current age?
(2) What is your expected retirement age?
(3) How much do you think you will spend every month when you retire (of course in today’s prices)
(4) Your expectation of inflation (%)?
(5) Your expected return (%) on investments?
Once the data is available, we will need to calculate the following,
I have shown the worksheet on the right with some dummy data.
(6) The yearly expenses at the time of retirement: (3) * (1+(4))^((2)-(1))*12
(7) Corpus required to generate the above amount every year (and leave the principle behind): (6)/(5)
(If these calculations are overwhelming, download the excel retirement calculator workbook here.)
We know how much corpus is needed.
We can use FV() formula to determine the future value of a series of payments made periodically and compounded at a given interest rate.
We know how much the FV() out come should be, but we don’t know how much the input (monthly investment) should be.
This is where goal seek is going to help us.
Let us assume the monthly investment amount will be in cell A5. Let us also assume, the interest rate is in cell A4, retirement age is in A3, current age is in A2.
We will write the FV formula in cell A6 like this = -FV(A4/12,(A3-A2)*12,A5)
(we have to negate FV since it uses weird accounting notations)
Since the cell A5 is blank, the FV will show the value as 0.
Now, we will use goal seek to find out how much cell A5 should have so that A6 will be calculated to the corpus amount required.
Go to Data tab and click on What if analysis and select goal seek. (In excel 2003, it should be in tools menu)
See this screen cast to understand how the goal seek works:

The goal seek window has 3 inputs. The cell you need to change. The cell you want to set and the value to set.
Once you use the goal seek it will find the correct (or closest) value to meet the goal and displays it. If you press OK, the value will be placed in the cell (in our case, in A5)
That is all.
Download the Retirement Calculator Excel Worksheet and play with it
Click here to download the retirement calculator worksheet. Follow the instructions in the workbook to see this example for yourself. Change values to find the amount that you need to save.
Do you find goal seek feature useful?
What do you do with excel goal seek? Do you use it in your modeling, planning worksheets? Tell me your experiences and ideas using comments.
Additional resources:
- Read remaining posts in Spreadcheats series: Become a spreadsheet guru by learning these nifty hacks.
- Excel financial formulas – Help on NPV, FV, PV and more
- Understand why you should start early when it comes to retirement savings
- Buy or rent calculator in Excel – calculate returns on property investments
PS: the retirement calculation steps are derived from this excellent article on smart investor












12 Responses to “29 Excel Formula Tips for all Occasions [and proof that PHD readers truly rock]”
Some great contributions here.
Gotta love the Friday 13th formula 😀
Great tips from you all! Thanks a lot for sharing! bsamson, particularly you helped me on a terribly annoying task. 🙂
(BTW, Chandoo, it's not exactly "Find if a range is normally distributed" what my suggestion does. It checks if two proportions are statistically different. I probably gave you a bad explanation on twitter, but it'd be probably better if you fix it here... 🙂 )
Great compilation Chandoo
For the "Clean your text before you lookup"
=VLOOKUP(CLEAN(TRIM(E20)),F5:G18,2,0)
I would like to share a method to convert a number-stored-as-text before you lookup:
=VLOOKUP(E20+0,F5:G18,2,0)
@Peder, yeah, I loved that formula
@Aires: Sorry, I misunderstood your formula. Corrected the heading now.
@John.. that is a cool tip.
Hey Chandoo,
That p-value formula is really great for a statistics person like me.
What a p-value essentially is, is the probability that the results obtained from a statistical test aren't valid. So for example, if my p value is .05, there's a 5% probability that my results are wrong.
You can play with this if you install the Data Analysis Toolpak (which will perform some statistical tests for you AND provide the P Value.)
Let's say for example I've got two weeks of data (separated into columns) with the number of hours worked per day. I want to find out if the total number of hours I worked in week two were really all the different than week one.
Week1 Week2
10 11
12 9
9 10
7 8
5 8
Go to Data > Data Analysis > T-Test Assuming Unequal Variances > OK
In the Variable 1 Box, select the range of data for week 1.
In the Variable 2 Box, select the range of data for week 2.
Check "Labels"
In the Alpha box, select a value (in percentage terms) for how tolerant you are of error.
.05 is the general standard; that is to say I am willing to accept a 95% level of confidence that my result is accuarate.
Select a range output.
Excel calculates a number of results: Average (mean) for each week's data, etc.
You'll notice however that there are two P Values; one-tail and two-tail. (one tail tests are for > or .05), the number of hours I worked in week two is statistically equivalent to the number of hours I worked in week one.
So here’s a way you might want to use this. You put up a new entry on your blog. You think it’s the best entry ever! So you pull your webstats for this week and compare it to last week. You gather data for each week on the length of time a visitor spends on your website. The question you’re trying to prove statistically is whether there’s an average increase in the amount of time spent on your website this week as compared to last week (as a result of your fancy new blog post). You can run the same statistical test I illustrated above to find out. Incidentally, it matters very little to the stat test whether the quantity of visitors differs or not.
Anyhow, the Data Analysis toolpack doesn't perform a lot of stat tests that folks like me would like to have access to. In those cases I have to either use different software, or write some very complicated mathematical formulas. Having this p-value formula makes my life a LOT easier!
Thanks!
Eric~
Fantastic stuf..One line explanation is cool.
Thanks to all the contributors
OS
Take FirstName, MI, LastName in access (you can fix it to work in excel) capitalize first letter of each and lowercase the rest and add ". " if MI exists then same for last name:
Full Name: Format(Left([FirstName],1),">") & Format(Right([FirstName]),Len([FirstName])-1),"") & ". ","") & Format(Left([LastName],1),">") & Format(Right([LastName],Len([LastName])-1),"<")
I teach excel, access, etc etc for a living and i have my access students build this formula one step at a time from the inside out to show how formulas can be made even if it looks complicated. Yes I know I could just do IsNull([MI]) and reverse the order in the Iif() function but the point here is to nest as many functions as possible one by one (also I illustrate how it will fail without the Not() as it is)
Extract the month from a date
The easiest formula for this is =MONTH(a1)
It will return a 1 for January, 2 for February etc.
if in a column we write the value of total person for eg. 10 if we spent 1.33 paise each person then how we get total amount in next column and the result will in round form plzzzzz solve my problem sir................... thank u
@Anjali
If the value 10 is in B2 and 1.33 paise is in C2 the formula in D2 could be =B2*C2
If the values are a column of values you can copy the formula down by copy/paste or drag the small black handle at the bottom right corner of cell D2
kindly share with me new forumulas.
How to convert a figure like 870.70 into 870 but 871.70 into 880 using excel formula ? Please help.