Many companies featured on Money advertise with us. Opinions are our own, but compensation and
in-depth research may determine where and how companies appear. Learn more about how we make money.

Money is not a client of any investment adviser featured on this page. The information provided on this page is for educational purposes only and is not intended as investment advice. Money does not offer advisory services.

New York Stock Exchange
Traders work on the floor of the New York Stock Exchange (NYSE) on Aug. 24, 2015 in New York City.
Spencer Platt—Getty Images

Last week's $1 trillion stock market selloff was scary. After almost seven years of bull market, we were all reminded of the fallibility of our retirement accounts and college nest eggs - as in: yikes, this can really fall fast.

But don't ask yourself why you didn't sell last Monday, before the market fell almost 6% and had its worst week since the fall of 2011. Ask yourself instead, now what?

When the U.S. markets open on Monday, none of us will know whether this is a spectacular buying opportunity or the beginning of a bloodbath that will push our retirements out until we are 85. Here is how you can make money either way.

-- Maximize tax losses. Sell losing shares of stocks or mutual funds that you own directly, outside of a tax-protected retirement account. That enables you to lock in the loss that can net you sizeable tax savings.

You can use your losses to offset any investment gains you have at the end of the year and up to $3,000 in ordinary income. If you lost a bundle, you can carry forward unused losses too.

Here's an example. Say you bought 100 Apple shares for $13,200 on July 20. At Friday's close, they were worth $10,500. Sell at that price and lock in the $2,700 loss.

That will save you at least $560 in taxes if you use it to offset a gain in a security you've held at least a year. But it can save you much more - $756 off of your federal taxes in the 28% tax bracket and another $200 or more in a high tax state - if you use it to offset a gain in another short-term security, one you've held for less than a year.

To maximize your losses, do this: Sell all of your long-term losers - you can use them to offset gains and ordinary income. Sell short-term losers more circumspectly: Sell them if you can offset them by also selling short-term winners you've decided not to keep owning, or if you have no long-term losers and would be happy with the $560 in savings as in the case above. Note that you have to wait a month to rebuy shares of a security you're selling for a loss, and you can't sell securities you've held less than a month to take a loss.

-- Match your portfolio to your promises. Maybe the big bull made you lazy about selling stocks and stock funds. But if you have money in the market that you'll need within five years - say to pay college tuition or begin your retirement or make a house downpayment - take it out now and tuck it away safely, even if your bank won't pay you much to keep it there. Short-term money doesn't belong in stocks, it belongs safe.

-- Buy off of a list. Though all but 10 companies in the broad Standard & Poor's 500 index fell in Friday's rout, that doesn't mean that every company suddenly has a much worse outlook than it did a week ago. If you know which companies and industries interest you in the long term, it is better to buy them at post-selloff low prices than high ones. If you are buying individual stocks, check factors beyond their price, like sales growth figures and price-earnings ratios, which offer a way to measure how expensive a stock really is. Stocks are roughly 6% less expensive than they were a week ago, though they could become cheaper still. If you have your list ready, you'll be ready to pounce.

-- Keep perspective, and know yourself. Most bull markets are marked by regular "corrections" - periods in which shares fall 10% from their high. This long up market has been notably absent of corrections - the last one was four years ago and we are in that territory now. Stocks may just be pausing for a few weeks while professional investors go on vacation and wait for a September signal from Federal Reserve policymakers about where they see the economy. Given that shares may fall further, and badly, or may pause and rise again, don't make an all-or-nothing move based on the market. Make it based on what you know about yourself.

If you are a very long-term investor who's been afraid to commit to a costly market, this month may give you an opportunity to move more money into stocks. If you haven't slept since Friday because you're so worried about the 5.8% weekly decline that you can't function, sell.