School is back in session, and in honor of that, the Motley Fool Answers duo of Alison Southwick and former middle-school teacher Robert Brokamp are taking you back to the classroom -- virtually speaking. In this segment, they dig into some basic investing equations that everyone needs to know. And maybe you do...or maybe a little refresher course could be in order. Just in case, let's go over the P/E ratio, the 12-times-salary retirement savings ratio, and the housing cost ratio.

A full transcript follows the video.

A secret billion-dollar stock opportunity
The world's biggest tech company forgot to show you something, but a few Wall Street analysts and the Fool didn't miss a beat: There's a small company that's powering their brand-new gadgets and the coming revolution in technology. And we think its stock price has nearly unlimited room to run for early in-the-know investors! To be one of them, just click here.

This podcast was recorded on Sept. 13, 2016

Alison Southwick: Next class -- math.

Robert Brokamp: Math. Well, class, we're going to talk about three important financial ratios. One you've probably already heard of, and that is the P/E ratio. We all talk about it. You've probably heard of it. It's the most common way to measure a stock or the overall stock market, but I thought it would be good to explain it to make sure everyone understands how it's calculated. You first have to calculate a stock's earnings per share.

Southwick: Wait, teacher, teacher, teacher...

Brokamp: Yes, yes, yes, yes?

Southwick: Wait. Why do people use the P/E ratio again?

Brokamp: It is a measure of the stock market's or an individual stock's value.

Southwick: Value. Not its price...

Brokamp: Right.

Southwick: ...not its stock price.

Brokamp: Right. It is how much you are paying for a dollar of a company's earnings. So to do it, you first have to take the company's earnings (which is its profits), divide it by the number of shares outstanding, and you get the earnings per share. Most P/E ratios look at the earnings per share for a company over the previous 12 months, and that gets divided into the market price.

Let's say you have a stock that has an earnings per share of \$2. It's trading for \$20 per share. \$20 divided by \$2 -- you have a P/E of 10. If that same stock were trading for \$40, you then would divide \$40 by \$2. That's how it goes. You'd get a P/E of 20. That is basically a measure of how much you're paying for a dollar of earnings.

Now there are different P/E ratios that people talk about. So that's the trailing P/E. Some people look at the forward P/E, and that is a projection of a company's EPS (earnings per share). Nowadays you hear the cyclically adjusted price-to-earnings ratio, called the CAPE or the Shiller P/E, because Robert Shiller, the Noble Prize-winning economist. popularized it. It averages out the previous decades of earnings and adjusts them for inflation.

But if you look at history, it's actually a decent indicator of what returns will be over the next 10 years. The CAPE, as it's known, is pretty high these days, so it indicates that future returns will be low. That's why people use the P/E ratio. They want to get an idea of whether they're getting a good value for a stock.

Southwick: Every time we talk about P/E ratio, I end up asking you a question like, "What's a good P/E ratio?" Then I always forget what your answer is. But you're a really good teacher. Just to let you know that you're doing great.

Brokamp: Thank you very much. Historically, the P/E of the overall stock market is around 16 to 17, so there you go. That's the first one.

Our second one is the "12 times salary retirement savings" ratio. That's a name I came up with in an article I wrote for Rule Your Retirement. I looked at all kinds of studies that looked at how much someone should save before they retire. They were expressed as a multiple of your annual salary.

Southwick: At the time of retirement?

Brokamp: Right before. Basically it's an indication of when you can retire. And the consensus of the studies was that you should be shooting to have between 10 and 12 -- and 12 is better -- 12 times your annual salary before you retire. It assumes that you're going to be retiring in your 60s and that you're going to have about a 25- to 30-year retirement. So if your household income is \$100,000, you should have about \$1.2 million saved before you retire. It's just a good benchmark, because people are always curious about when they can retire, and it's a good thing to shoot for.

Now of course, it's a rule of thumb, and it depends on your other assets. If you have a pension, for example. If you have rental real estate. It also depends on your income. It turns out if you have lower income (like \$75,000 per year) you may need only 10 [times]. If you are in a higher income (like \$200,000 a year) you probably need something closer to 14 to replace your income.

That's because Social Security, the way it is designed, replaces a greater percentage of income for lower-income people. For higher-income folks, Social Security is going to replace less of your income. So the more money you earned over your lifetime, the more you have to have saved if you want to replace your income before you retire. That's No. 2.

And No. 3 is the housing cost ratio. It starts with how much lenders will lend you. They're going to look at your before-tax income and they're going to say, "We only want your housing expenses to be when the expenses (mortgage, insurance, and property taxes) equal 28% of your before-tax income." So you've got to shoot for that to get a loan. If the mortgage is going to take up more of your income than 28%, there are programs available to help you.

But I think it's a good guideline, regardless of whether or not you need to take out a mortgage, and it's also a good guideline if you're going to determine what rent you can afford, too, because when you look at your budget, your housing costs (whether it's a mortgage or rent) is going to be the biggest line item, and therefore it's going to determine how much you have left over to save. So I think it's a good idea to shoot for keeping all that to 28% to 30% of your expenses.

It does depend on your circumstances. I had a conversation, just today, with a colleague of ours who's thinking of buying a home. This person is married, but they don't have kids, and that figures into it. If you're not going to have kids, you're going to have a lot more money left over...

Southwick: You can get any house you want.

Brokamp: You can have five houses.

Southwick: You can each have a house everywhere.

Brokamp: Exactly. And they're not sure, but they're thinking of it. So you have to factor that into the situation, because once you have kids...

Southwick: You can't have nice things.

Brokamp: I don't know what the current number is, but the Department of Agriculture (yes, agriculture) estimates how much it costs to raise a kid to about age 17. It's something like \$300,000, and that's not including college. So that would factor into this, but I still think trying to keep your housing expenses to 30% or less of your budget is a pretty good idea.

Southwick: There you go. Three ratios to know are the P/E ratio, the "12 times your salary" ratio -- is that what we're calling it?

Brokamp: Sure. It sounds good to me.

Southwick: And the housing cost ratio. Less than...

Brokamp: Twenty-eight percent of what lenders will use. But just as a guideline, 28%-30% is good. Class dismissed.