Tag Archives: Microsoft Excel

What’s the expected value of your Powerball ticket?

As the Powerball jackpot grows to over $300 million, we start to wonder if maybe buying a ticket is “worth it.” While the lottery is “worth it” in that ticket sales goes to things like state education, buying tickets is typically not worth it for yo because the projected payoff is far less than the ticket price.

The concept of Expected Value is a central idea in probability and statistics and refers to a weighted average outcome. For our Powerball example, the expected value equals the probability of getting each combination of winning numbers, multiplied by the payoff of the combinations.

Spreadsheet Inputs

The Powerball website has a table with the odds and the payouts of each winning combination of numbers, making our job relatively easy.


We can transcribe these into a spreadsheet:


Spreadsheet output

There isn’t much logic to this one. First we convert the odds column into probability, by taking one over the odds plus one.


Then we multiply the probabilities with the respective payouts by using the Sumproduct() Function:


Since Powerball tickets cost $2, it seems we’re still losing about 65 cents on each ticket even with the jackpot above $300 million.

It looks even worse given the $302 million is the simple sum of annuity payments, while the cash value is much less at $187.3 million.


That takes us down to 96 cents.


Taking into account a 35% tax rate would then take us down to 62 cents. And then there’s the chance that there are multiple jackpot winners, resulting in a split (we won’t get into that one here, but check out this fivethirtyeight post for more). Finally, let’s use the Goalseek function in excel to see when it becomes worth it to buy a lottery ticket taking into account a 35% tax bracket.

Pull up Goalseek from the Data Tab –> What-If Analysis –> Goal Seek


Then we set the after tax expected value cell (D16) to $2, by changing the jackpot cell (B5). Basically Goalseek is Excel’s functionality for “guessing and checking”, for those who are not as algebraically inclined…


The answer? $806 million! And that isn’t accounting for potential splits which is pretty likely once the jackpot gets that high.


How much money do you need to retire?

As mentioned before, we love browsing through the questions and answers on Quora. Every Quora session reveals financial success stories, inside views into jobs and companies, and some practical life advice.

One topic that comes up frequently is how much money one needs to stop working. That is a question that spreadsheets are well-suited to solve! Let’s build our Financial Freedom Spreadsheet Calculator.

Spreadsheet Inputs

  • Current Age – The older you are, the less time you’ll need your money to last.
  • How much money you have saved up – This pile of money is what will earn returns to support your lifestyle, since you won’t be working
  • The annual return on your investments – More risk, more return…
  • Your expenses – Retiring isn’t cheap! When you quit your job, you’ll have to find health and dental insurance, you’ll still have to pay taxes on your investment earnings, and your kids will still need to go to college (taking out student loans builds character?)… we also need to assume expense inflation. This site assumes the average annual expenditure is about $56,000, including taxes.

That’s pretty much it! Here’s our spreadsheet so far:


Spreadsheet Logic

Most of our logic will follow our post, Personal Finance Made Easy (with Spreadsheet Modeling!). We’ll forecast our investment income, expenses, and the balance of our money saved for each year going forward in each column in our spreadsheet. First, we’ll set up year 1 pulling in the inputs from our assumptions cells. The investment income each year will equal the money saved (B15) times our assumed investment return (b7), with a fixed reference on the cell B7:


Our net income is the investment income minus expenses, which we will add to our initial money saved balance to get the ending balance:


Now for year 2, the current age will increase by 1, the beginning money saved for year 2 is the ending money saved from year 1, investment income will be the same formula, and expenses will increase by inflation:


Now we can paste the formula from column C as far to the right as we need in order to simulate future years:


(This guy probably needs to keep working…)

Now that we have a projection of how much money we’ll have at each year in the future, we can add in a couple cells to ask interesting questions of our spreadsheet, like: Will I have enough money to last until I am 100 years old? We can use an HLOOKUP() to look up how much money is saved at age 100:


Finally, we can make use of a data table to see how much money we need to have saved at what age to stop working and cover expenses until we’re age 100:


Looks like if we have about 2.5 million, we’re generally in the clear, or $2 million after age 40. I’m realizing now that this doesn’t include social security and future one time college expenses, and a progressive tax formula, but I’ll leave those updates as an exercise for the reader.

One more interesting data table – how does the ability to retire change with the assumed return on investments? We’ll assume the user is age 35.


Every percent of extra return makes a huge difference on the resulting asset balance at age 100. While the 35 year old could return with $2.5 million at 4%, they’d have to keep working until $4 million if they were only earning 2%. This is the downside of the current low interest rate environment and why for some people it is better for stocks to go down than up!

You can access the Excel spreadsheet here: How much money do you need to retire? Financial Freedom Calculator

The “360 spreadsheet” for teachers and educators

We first heard of the 360 spreadsheet from the book Hacking Education: 10 Quick Fixes for Every School by Barnes and Gonzalez. This post* (and more to come) will cover how spreadsheets can be a tool for those with a love of teaching, learning, and inspiring others.

A 360 spreadsheet is a simple tool that provides teachers with a more complete, “360 degree” view of each student. Basically, it allows them to get to know their students on a deeper level, all in one place. We created a slightly enhanced version of the 360 spreadsheet in Google Sheets, which has many benefits. We’ll show you how we added new features to this spreadsheet, which you can download below.  Continue reading

Play Jeopardy at home with this Mobile Spreadsheet

This is the third in our three-part series of designing spreadsheets entirely on our mobile devices. Part 1 was a New Year’s resolution keeper and Part 2 was a weighted lottery to make a group decision on where to go for lunch. Today we’ll build a spreadsheet on the iPad that allows you and your friends to play along with the Jeopardy TV show, all while keeping score for a friendly competition.


Continue reading

Keep New Year’s Resolutions with Spreadsheets

new-year-hatWhat are your new year’s resolutions? As in most cases, coming up with the goals is easy…but achieving them is another story! According to a Forbes article published a couple of years ago, only 8% of Americans achieve their resolutions. How can we keep our resolutions? Can we be better at goal-setting? As an organizational and prioritization tool, spreadsheets can keep us accountable and help us reach our goals. In our busy lives, it can be a challenge to keep track of and prioritize everything we set out to do. Spreadsheets can help by making us better managers of our lives. Continue reading

Will you pay more or less under the Trump Tax Plan?

After nearly a year and a half after the candidates first declared their intention to run for the Presidency, we have now elected a new President. Trump’s Presidency was a surprise to many, and with Republicans in control of both the House and Senate along with the Presidency, major changes could be possible.

One of those changes could be taxes, where Trump has proposed a tax system with three tax brackets of 12%, 25% and 33% and an increase in the standard deduction to $30k for joint filers, while also eliminating exemptions for dependents. We wondered: roughly how would taxes change for any given level of income, filling status, and number of family members? This is a problem spreadsheets are well suited to solve! Continue reading

Monte Carlo Simulation – Fantasy Football playoff predictor

How likely will you make the fantasy football playoffs? It’s week 11 of the Fantasy Football season, which means there’s only three more weeks until the Fantasy Football playoffs. All your hard work up to this point – drafting your team, closely following daily fantasy football podcasts and injury reports, and agonizing over who to play in your Flex spot – rests upon what happens in these next few weeks. Continue reading

Build a sports league power ratings spreadsheet

Need a way to track results and calculate power ratings for your tennis, ping pong, chess, Magic: the Gathering, or video and board game leagues?

As you might guess from much of the content posted over the past couple years, we at Spreadsheetsolving are huge fans of sports and games. There’s something about competition that sharpens the senses and motivates you to do your best. There’s also something satisfying about there being a clear winner and a loser when the game is over.

So what can you do when you’ve organized a group to play tennis, ping pong, magic, etc. and you want a system to track results and assign people ratings based on their match histories?


Continue reading

Make a Buy vs Rent calculator spreadsheet

Is it better to buy or rent a house? Advice on this problem comes in all shapes and sizes, from the dogmatic idea that homeownership is the American dream, to some more nuanced methods like calculating the price to rent ratio. What would you do if you found a great house and are deciding whether to buy it or keep on renting?house-435618_1280
Continue reading

Is medical school “worth it”? An introduction to Internal Rate of Return (“IRR”)

Finance hiring is down, law school grads are having a tough time finding real law jobs, so what is an ambitious but risk averse college student to do with his or her life these days? Okay, right now the answer is computer science. Yes seriously, do computer science. But let’s pretend it is the year 2001 and the only other option respectable option is medical school. But doesn’t med school take a lot of time (4 years school plus 3-7 years residency/fellowship) and cost a lot of money? How can we figure out if going to med school and not earning doctor money until 7 years from now is worth it financially relative to just entering the workforce and working for those 7 years? Continue reading

How to analyze a nonprofit Form 990 with a spreadsheet

“The more you give, the more you get, that’s being alive” – The Money Song, Avenue Q

Charitable giving serves a valuable purpose  in  our society. It allows organizations in health, education, social services and others to provide benefits to people who otherwise couldn’t afford them. It allows people who have built up wealth to give back and make a difference. The federal government even subsidizes charitable giving by allowing donations to be deducted from income reported for taxes (effectively kicking in up to 39.6% of each donation). It’s a great system that is meant to fund those people and organizations in need. At least that is how it should be. Continue reading

Build a Spreadsheet to help you choose a healthcare plan

Will you save more with standard PPO or a high-deductible PPO Saver plan with a Health Savings Account?

It is currently Open Enrollment season at many workplaces, which is when employees choose their medical insurance and other benefits plans for the upcoming year. It’s also the time of year when people grumble “why is the US healthcare system so complicated” and just elect whatever plan they had in the prior year. Building a spreadsheet can help someone compare the costs and benefits of each of the plans under a variety of different assumptions about tax rate and healthcare expenditure. Continue reading