If you're reading this, you're about to begin a lifelong journey toward financial freedom. The principles set forth in this guide will give you tools you can use to build wealth for yourself and your family and retire in style.

We'll teach you what drives investing returns, how to invest with the right mindset, what to invest in, and when to sell. Let's get started!

Before considering whether you want to invest, it's important to understand exactly what investing is (and what it isn't). At its core, investing is quite simple. Legendary investor Warren Buffett defines investing as laying out money now to get more money back, in real terms, in the future. Investors want to rub two nickels together today to make three appear tomorrow. But how do they do it -- and how can you?

The Magic of Compound Interest

Investing returns are driven by compound interest. Think of compound interest as "interest on interest," resulting from reinvesting earnings back into an investment. We'll illustrate this phenomenon in more detail below.

The amount of compound interest an investor receives depends on three things: the amount of money invested ("your money"); the rate of return on the investment ("i"); and the amount of time the investments are allowed to grow ("n"). It all comes together in this formula: 

Compound interest formula

Compound interest is magical. Albert Einstein reportedly called it "the eighth wonder of the world." However, like all magic, compound interest has both a light side and a dark one. Making compound interest work for you is the key to investment success.

Debt and the dangers of compounding

Unfortunately, you're likely most familiar with an example of compound interest working against you. The pitfalls of credit card debt are well-known: The deeper in debt a person falls, the harder it is to get out. Interest on the debt builds relentlessly until the outstanding balance is far more than the debtor ever spent in the first place.

Imagine you put $200 on a credit card every month. If you never pay off the debt, interest compounds over time (meaning you pay interest on your previously accrued interest), and the outstanding balance you owe begins to rise faster while your spending stays the same. After five years -- assuming your credit card charges 18% interest and you make $15 monthly minimum payments -- here's how your balance would grow over time:

Year

$200 in Monthly Spending

Balance Due

Accrued Interest

1

$2,400

($2,652)

$252

2

$4,800

($5,583)

$783

3

$7,200

($9,088)

$1,888

4

$9,600

($13,278)

$3,678

5

$12,000

($18,288)

$6,288

After five years of spending $200 a month, your credit card balance would be $18,288 -- $6,288 higher than what you actually spent. Interest makes up more than a third of the outstanding balance! And as the 18% interest on your card compounds every year, new interest accrues faster and faster.

If you let that process go on for too long, the debt might feel insurmountable. If you're reading this and owe credit card or other high-interest (over 10%) debt, it's important to pay it off before you consider investing. Check out this article from The Ascent, a personal finance brand by The Motley Fool, for more guidance on your debt repayment journey, and come back here once you're ready to invest.

Making compounding work for you

Thankfully, investors can harness the awesome power of compound interest to generate wealth for themselves. Imagine that instead of putting $200 on a credit card each month, you invest that money in the S&P 500, a diversified group of 500 of the largest companies in the United States. If you'd done that from the beginning of 2014 through the end of 2018, here's what your returns would have looked like:

Years

Invested Capital ($200/month)

Portfolio Balance

Investment Gains

Annual Gains (Losses)

2014

$2,400

$2,838

$438

$438

2015

$4,800

$5,334

$534

$96

2016

$7,200

$8,630

$1,430

$896

2017

$9,600

$13,278

$3,678

$2,248

2018

$12,000

$15,083

$3,083

($595)

Returns assume 100% allocation to VFIAX.

By continually saving and investing your cash, $200 at a time, over 60 months you could have generated $3,083 in returns -- that's 15 months' worth of $200 payments created out of thin air. Time, as they say, is money.

If you looked closely at the two tables above, you may have noticed a few things. You may have noticed that the portfolio -- gasp! -- lost value in 2018. You also might be wondering why the investment gains after five years were less than half the accrued interest on the credit card after the same period of time. There are many potential takeaways from these observations, but for our purposes, one is the most important: Investing is not a way to get rich quick.

Stocks don't go up in a straight line

After you've discovered the magic of compound interest, investing can sound easy. You're saying, "all I have to do is save money and let the market go to work creating wealth for me? If I can just load my savings into a few great stocks, I'll be rich in no time." If only it were that simple.

Unfortunately, stocks don't go up in a straight line. If you'd invested $10,000 in the S&P 500 in 2000, you would have more than doubled your money. To enjoy those returns, all you had to do was invest the money and sit on your butt for 20 years. Easy, right?

What if I told you that over the course of those 20 years, you'd see your portfolio's value cut in half twice -- and you'd still have to do nothing? What if I also told you that your portfolio would take more than four years to recover each time? Sound easy now?

You're smart, though, right? If you pick just the best stocks, can't you do even better than the market and avoid all that pesky volatility? ... Well, no. Even the best-performing stocks can suffer debilitating, volatile periods that make it difficult for even the staunchest investors to hold strong.

Amazon (AMZN -1.14%) is a perfect example. An investor who purchased $10,000 worth of Amazon stock in January of 2000 has holdings worth over $300,000 as of this writing. The e-commerce behemoth has clearly skyrocketed in value over the past couple of decades, but it's been anything but a smooth ride.

While Amazon's returns over this period were incredible, so was the stock's volatility. Investors suffered a 92% decline in stock price during the dot-com crash at the turn of the millennium, and it took Amazon seven-and-a-half years to bounce back. If that weren't enough, the stock endured another 54% drop during the financial crisis of 2007-2008. And there have been four additional dips of 20% or more in its history.

To capture the huge returns Amazon delivered during this period, investors had to hold strong through each and every one of these uncertain periods, maintaining confidence despite repeated evidence that their investment could be misguided. While the rewards from investing are great, the path to investing riches is anything but easy.

Investing is hard. But if you approach it with the right mindset, you can make it a whole lot easier. Here are a few tips to ensure you invest with the right frame of mind.

Timeline: Think long term

As demonstrated above, stocks don't move in a straight line. To enjoy long-term gains, investors must weather short-term volatility, often accompanied by hair-raising price declines. Those who focus intently on this temporary instability will find it difficult to hold steady when it strikes. Focus instead on the long-term trajectory of the business and let everyone else stress about near-term noise.

Temperament: Keep calm and carry on

When you think long term, you'll be able to react with indifference when market volatility hits. Successful investors have the ability to remain calm and levelheaded when everyone around them is freaking out. That mindset makes the difference between investors who consistently outperform the market and those who just get lucky for a while. Warren Buffett says this is the key to his success. When a group of business-school students asked Buffett why so few have been able to replicate his investing triumphs, his reply was simple: "The reason gets down to temperament."

Money, IQ points, and lucky socks are no help when your investment is down 50%. But if you can keep your emotions in check and ignore the noise, you'll be able to hang on (or even back up the truck and load up) rather than selling out at the worst times. If you look back at history and study how investing fortunes were made, you'll find it wasn't by jumping in and out of stocks based on fear and greed, but by buying great businesses and investing in them over the long haul.

Understanding Debt First

The ability to think long term and react with disinterest to a major price decline is a luxury. Many people live paycheck to paycheck, and for them, a 50% or more decline in a significant fraction of their net worth would be life-altering. Even if you're well-off today, you could be an injury, layoff, or illness away from a similar situation.

Because of this risk and because there's always a chance that your portfolio's value could decline significantly, it's important to put your financial life in order before you invest. That way, you'll have the freedom and peace of mind to think long term and ignore temporary price declines. Here are two things to invest in BEFORE you invest to make sure you have that luxury.

Pay off high-interest debt

Under nearly every set of circumstances, the best use of your cash is to pay down high-interest debt. For most, that means credit card debt.

As demonstrated above, credit card debt grows more and more quickly the longer the balance compounds. Furthermore, the interest rates on credit card debt are high, reflecting the risk of lending to individuals.

Emergency fund

In case we haven't already made this clear, stuff happens -- stuff that requires money to fix. (Think job loss, car transmission issues, medical bills, or anything else that Murphy or life throws your way.) If you don't have that money on hand, you'll have to improvise to make ends meet, which could mean patching over the problem with a credit card.

That's why everyone should have an emergency fund, a cash hoard you can raid if unexpected expenses show up. Your emergency fund needs to be readily accessible in a simple savings account. Don't expect to make a killing on this investment -- the interest you can get on most savings accounts won't even keep up with inflation -- but the peace of mind it will buy is priceless.

How big should this essential investment be? Here are some basic guidelines:

If You ...

Then Your Emergency Fund Should Cover Living Expenses for ...

Have no dependents relying on your income

3 to 6 months

Are the sole breadwinner or work in an unstable industry

6 to 12 months

Are retired and living on a fixed income

5 years

While those suggestions may seem excessive, following them will put you in a position to stay the course in your investments, no matter what unexpected expenses come your way. While having six or more months' worth of cash on hand may seem like a lot, it's better to have it and not need it than need it and not have it.

Once you've paid off your high-interest debt and built up an emergency fund, you'll have the freedom and peace of mind to invest for the long term and build real wealth. Now, let's discuss what to do with your extra cash once you're ready to invest.

So you're armed with the right investing mindset, and you're prepared to endure whatever short-term volatility the market throws your way. In other words, you're now ready to invest. However, there are still some decisions to make. What brokerage will you use? Should you invest in a taxable account or a tax-advantaged version? In this section, we'll explain the pros and cons of what's available to you as an investor, as well as how to begin.

The Steps to Investing

Before you can invest, you need to open a brokerage account. A broker is a person or institution licensed to buy or sell investments via exchanges, and without a broker, the average person cannot invest in stocks and many other investment vehicles.

There are dozens of brokerages available, with most offering the same basic services. When choosing a brokerage, it's important to minimize fees and commissions -- over time, those costs will sap investment returns. Click here to read about the Fool's favorite online stock brokers.

Choose the right type of account

Once you've opened a brokerage account, you're almost ready to invest, but there is another key step: You need to decide what types of investment accounts to stash your holdings in.

  1. Short-Term Money (or Money You Need in the Next Five Years)

As we've discussed, real returns are made in the stock market over the long term. Without a time horizon of five years or more, returns are much more dependent on market fluctuations than on the earnings power of businesses themselves. For that reason, any money you might need in the next five years DOES NOT BELONG in the stock market.

That said, there remains a vast array of appropriate places to stash the money you may need to access soon, including basic checking and savings accounts, high-yield savings accounts, money market accounts and funds, certificates of deposit (CDs), Treasury bills, and all sorts of bonds. These types of accounts are safe harbors: They won't provide killer rates of return (and may not even keep up with inflation), but they do provide a guarantee that the money you deposit will all be there when you need it.

Keep in mind that one type of account may not best serve all of your short-term savings needs. For example, cash earmarked for a home down payment that you plan to make in a few years is ideal for a CD, while Junior's summer-camp tuition is better off in a high-yield savings account.

Once you've deployed your funds for near-term needs, it's time to find the right spot to park your money for the long term.

Long-term money: To tax or not to tax

Long-term money -- that you're saving for retirement -- belongs in accounts designed for that purpose, and it should primarily be in stocks. However, there are a number of different accounts in which you can hold your investments, and that maze of options can be confusing. Here's our Foolish guide to how to handle your long-term cash.

Option A: Your workplace retirement plan

What if you could invest your money in a place where at least a portion of your contribution was guaranteed to double?

If you work full-time, you may have that opportunity through your employer-sponsored retirement account -- your 401(k), 403(b), or 457. If your company offers one of these plans -- with a company match -- don't pass up the free money! We typically recommend that you put your first long-term investment dollars into this type of account if it's available. Contact your employer's HR office to get started.

These plans allow you to contribute pre-tax money directly from your paycheck (within limits; see the IRS website at IRS.gov for this year's allowable contribution amounts). As a result, your money grows tax-free and your contributions lower your taxable income for the year (which means a lower tax bill come April). There's a catch, however. In exchange for paying no taxes until you retire and withdraw the money, you can't withdraw the cash (except in special circumstances) before age 59 1/2 without facing a steep penalty.

Unfortunately, some employers don't offer a match, and some plans provide horrid investment choices and charge high fees. Be aware of the fees you're paying for your 401(k), and don't be afraid to choose different investment options if your plan is full of funds with high expense ratios and bad performance (assuming you've done everything you can to take advantage of your employer's match).

Option B: Do it yourself with an IRA

Once you've maxed out your workplace retirement account (or if it's an atrocious plan, invested enough to get your employer match), divert your next retirement dollars into an IRA.

IRAs have one big advantage over workplace retirement accounts: They typically offer more investment options. However, Uncle Sam won't let you contribute as much money to these accounts each year (check with the IRS for this year's limits). And depending on your income, you may not be eligible to contribute to one fully -- or at all.

IRAs come in two garden varieties -- Roth and traditional -- and they offer different tax advantages:

  • Traditional IRA: Tax-wise, this account works just like a 401(k) -- the money you put into it isn't taxed until you make withdrawals during retirement. Also, as with a 401(k), you can deduct the money you contribute from your income, lowering your tax bill in the year you make the contribution.
  • Roth IRA: This account gives Future You a tax break. The money you sock away here is never deductible. However, come retirement, you get off scot-free -- you pay no taxes on the gains or the principal when you withdraw the money. A Roth IRA also allows you to withdraw your contributions tax-free at any time for certain things, such as a first-time home purchase or education expenses, whereas with a traditional IRA (and 401(k)), you'd not only pay taxes but also get hit with penalties.

Which one is right for you? We like the flexibility of the Roth -- and the fact that the earnings grow tax-free. That said, the Roth is not necessarily the best choice for everyone. For more information on how to choose the right IRA variety for you, check out this article from Fool.com.

Option C: Taxable accounts for everything else

If you've still got investable cash left over after maxing out all your tax-advantaged accounts, congratulations. The only special thing to know about taxable accounts is that ... wait for it ... they're taxable. Otherwise, you can manage these accounts very similarly to their tax-advantaged siblings. However, there are a few rules of thumb to follow when utilizing taxable accounts that might save you a few dollars.

1) Don't Invest in Dividend Stocks or Bonds in a Taxable Account (if Possible)

Dividends from stocks and real estate investment trusts (REITs), as well as bond coupon payments, are taxed at ordinary income tax rates. As a result, these investments are best held in tax-advantaged accounts. In these accounts, you can enjoy the benefits of their regular payments without having to pay a share of them back to the state through taxes.

2) Use Taxable Accounts for More Tax-Efficient Investments

Tax-efficient investments include long-term, buy-and-hold vehicles such as stocks that pay few or no dividends, as well as tax-managed stock funds. You won't pay taxes on these investments until you sell them, providing a built-in tax deferment (assuming you plan to Foolishly hold your investments for many years). When you do sell, the gains are taxed at the long-term capital gains rate, which is much lower than the rate for ordinary income tax.

Now that you've got the right mindset and you've chosen the proper account for your needs, it's time to start choosing some investments. But before we share a few of our favorite stocks, here are some important principles to keep in mind as you build your portfolio.

Buy Businesses, Not Stocks

When you buy a stock, you're buying a stake in a real business -- a business where people go to work every day to make a living for themselves and their families and, if they're lucky, make the world a little bit better. In the short term, a stock's price might move up or down for any number of reasons: bad weather, political and military conflict, even something as seemingly insignificant as an executive's tweet. Over the long term, however (which is all that matters in investing), your profits or losses on a stock will depend on the output of the people who go to work for the company every day. Pay attention to what those people are doing, rather than the stock market noise, and you'll be positioned to succeed as an investor for the duration.

OK, so you know to ignore short-term market volatility in a stock's price, but what should you pay attention to instead? Simply focus on the business behind the stock to ensure that it's a quality company that can perform well over the long term. If you can identify the best companies and do it early, you'll be able to compound your wealth many times over.

But how can you tell a good company from a bad one? Here are a few traits to look for to identify great businesses:

A sustainable competitive advantage

The most successful businesses have unique, lasting competitive advantages that allow them to earn outsize profits consistently over time. Legendary investor Warren Buffett has famously compared a company's competitive advantage to a castle's moat, protecting the business from competitors hoping to raid the stronghold and compete away its profits. The more durable a company's competitive advantage, the larger the "moat" that surrounds its financial fortress.

Because investors buy for the long term, and because any company making serious money will attract competitors, sustainability is the most important aspect of a competitive advantage. Sustainable competitive advantages often fall into one or more of five categories: brand advantages, technology advantages, network effects, scale advantages, and legally enforced monopolies (think patents).

Brand advantage

Coca-Cola (KO 0.68%) is a prototypical example of a company with a brand advantage. Even though Coke isn't radically different from store-brand cola, people will pay a premium for the Real Thing because of the relationship they -- and society at large -- have built with Coke's brand over time. No matter how hard competitors try, they'll likely never match the share of mind and feeling that people associate with Coke, making the business's advantage particularly durable.

Technology advantage

The best example of a technology advantage comes from Alphabet's (GOOG 0.37%) (GOOGL 0.35%) Google search engine. There were many search-engine companies when Google emerged, but none were able to match the quality of Google's search algorithm. Because of the superior quality of Google search, more and more people flocked to it, in turn feeding and improving the company's algorithm. As a result, Google was able to build a large, sustainable technology advantage, which has made it one of the most important companies in the world today.

Network effects

Network effects are among the most powerful competitive advantages available to a company. A network effect is a phenomenon in which a product or service increases in value as more and more people use it. (Google's increasing popularity, described above, is one example.) Network effects are often found when technology standards change, such as when VHS became the standard over BetaMax or BluRay prevailed over HD DVDs.

In the public markets, Facebook (META 1.54%) provides the clearest example of a company with competitive advantages derived from network effects. As a social network, Facebook delivers value by connecting individuals and allowing them to communicate and form groups. Therefore, Facebook's value depends on the number of users on its platform -- after all, nobody wants to be part of a social network in which theirs is the only profile. Although Facebook was one of many social networks when it was founded, it has grown to become the largest and most dominant, with 1 in 5 people on the planet using one or more of its services every day.

How did Facebook become so dominant? As the company grew and more users joined the platform, Facebook allowed more and more people to connect, and the resulting network effects made Facebook more and more valuable for each subsequent user who joined. As a result, Facebook was able to offer greater value than other, smaller social networks, creating a sustainable competitive advantage for the company.

Scale advantages

Scale is one of the oldest and best-known forms of competitive advantage, and it's one of the easiest to understand. Scale advantages derive from the concept of economy of scale, which just means that the cost per unit to produce something decreases as the number of goods produced increases.

To understand scale advantages, imagine you're the owner of a factory that makes toy cars. It costs $100 to build the factory and $1 to make each car. As the table below demonstrates, the cost per car produced declines rapidly as more and more cars are assembled at the factory.

Units Sold

Factory Costs

Car Costs

Total Costs

Cost Per Car Produced

1

$100

$1

$101

$101

5

$100

$5

$105

$21

10

$100

$10

$110

$11

20

$100

$20

$120

$6

50

$100

$50

$150

$3

150

$100

$150

$250

$1.67

500

$100

$500

$600

$1.20

1,000

$100

$1,000

$1,100

$1.10

10,000

$100

$10,000

$10,100

$1.01

15,000

$100

$15,000

$15,100

$1.006

25,000

$100

$25,000

$25,100

$1.004

As the factory's scale increases, the owner is able to spread their fixed costs over more and more toy cars, reducing the effective cost per car and allowing the company to charge lower and lower prices. Industrial companies of all stripes benefit from these types of scale advantages, including stalwarts like General Motors (GM -0.05%) and Ford (F 0.17%).

Legally enforced monopolies

The last form of sustainable competitive advantage comes in the form of legal monopolies. Although there are several kinds of legally enforced monopolies, such as regulated monopolies for utility companies, the most common example is patent protection. A patent allows its holder to exclude others from offering, selling, making, or using an invention for the duration of the patent, commonly 20 years from the date of the patent's filing.

A patent provides arguably the most powerful competitive advantage, although it has a fixed expiration date. Patents incentivize companies to invest heavily in inventions that cost a lot to create because they provide a set period of time for those companies to extract profits from those inventions without competition. As an investor, you'll most often encounter companies dependent on patents for their competitive advantage in the healthcare sector. There, businesses invest large amounts of capital up front to develop new therapies, and the money is then earned back over time while the company benefits from patent protection for the drug(s).

These are some of the key characteristics of winning companies, but they aren't the only things you should be looking for. You'll also want to see:

Cash on hand

Cash is the lifeblood of any business. Without cash, a company can't pay its bills and invest in growth. Look for low-debt, cash-rich balance sheets and steady cash flows. Specifically, focus on free cash flow -- the cash left over after funding operations and growth. This cash allows management to reinvest back into growing the business, fuels share repurchases, and pays a company's quarterly dividend.

Strong leadership with a long-term focus

As we've discussed, it's important for investors to focus on the long term when buying stock in a business. However, you can't be the only one focused on the far future -- after all, you won't be there running the business every day. Thus, it's important to identify management teams who operate their companies with the long term in mind and whose interests are aligned with yours as an individual shareholder.

In order to identify quality -- a well-aligned management team is more art than science -- here are a few questions to ask yourself when evaluating whether a management team is worth your trust.

Is the company founder-led?

Founder-led companies often have a more coherent long-term vision than other businesses, likely because founders tend to remain with their companies for a long period of time, retaining the initial intentions behind the business. Time and time again, founder-led companies have delivered market-beating returns for investors.

Is management invested alongside you?

When management holds stock in their company, their interests are better aligned with investors' interests because they are shareholders themselves. While it might sound a little cynical, there's no interest more powerful than self-interest. Founder-led companies are often disproportionately held by insiders, adding to their appeal.

  • Does management have a history of creating value for shareholders?
  • Does the management team have years and years of relevant experience?
  • Do they treat outside shareholders (business partners) with respect?

As a shareholder, you are a part-owner of a business. Therefore, it's important that you -- and other common shareholders -- be treated as such. If a company is reluctant to share information with its shareholders, it's difficult to know where that company stands. It's best to avoid these sorts of secretive businesses.

Remember what we said earlier about Amazon facing declines of as much as 90% on its way to becoming one of the best-performing investments of all time? Even if you'd identified Amazon early, it would have been very difficult to hold steady through all that volatility, and you'd probably have questioned the wisdom of your investment along the way. Most people would have sold at some point -- and that's for one of the greatest investments of all time.

Thankfully, you can make it easier to hold onto your investments (and make more money over the long term) through diversification. To keep the right mindset, it's important to remember that you'll make many investments over a lifetime and that thanks to the power of compounding, only a couple of winning investments over decades can build incredible wealth. Not every investment will be a home run, and that's OK.

From a more technical perspective, diversification reduces the volatility of your portfolio. The more stocks you own (assuming each holding receives equal weighting), the smaller the effect that any one stock's movements will have on your overall returns. As a result, diversified portfolios allow investors to largely avoid the hair-raising 50%-plus declines that would be commonplace in single-stock portfolios like the Amazon example discussed above.

How to Diversify

Diversification involves buying a number of stocks, but it's not quite that simple. Conventional wisdom says that an investor can achieve diversification by holding 15 to 20 uncorrelated stocks. The "uncorrelated" part is important. A portfolio made up entirely of investments in the oil industry is not diversified, no matter how many holdings it includes. Make sure to purchase investments from different industries, so that one macro event (like a decline in oil prices) will not hurt your entire portfolio.

One of the easiest ways to diversify your portfolio is through a broad index fund. If you've ever heard someone ask how "the market" did today, they were probably referring to an index, such as the Dow Jones Industrial Average or the S&P 500. Index funds simply attempt to track the performance of their target index, which is made up of a large number of stocks from across the market. When the index goes up, the aggregate value of the index has grown by a proportional amount, and vice versa.

Investing in index funds provides instant diversification to your portfolio at an affordable price. Furthermore, index funds charge very low fees relative to actively managed mutual funds, in addition to delivering superior returns, on average. Unlike index funds, actively managed funds attempt to beat (not track) an index by selecting individual stocks. Although fund managers charge much higher fees for the opportunity to beat the index, few are actually able to outperform.

According to data from S&P Dow Jones Indices, over the past 15 years, nearly 89% of actively managed U.S. equity mutual funds lost to their benchmarks. As a result, investors in actively managed funds are often paying significantly more money in fees than their index-fund compatriots, only to receive returns that are the same -- or more commonly, worse. While some mutual funds do succeed in beating the market on a consistent basis, in most cases, investors will achieve better returns net of fees by investing in index funds.

While we think it's important for every investor to own individual stocks, index funds allow individual investors to quickly and inexpensively achieve diversification, which plays an important role in any portfolio.

Now that you've mastered the mindset of investing and you know how to structure a portfolio for the long term, here are a few of our favorite investments. These companies can play a role in any diversified portfolio.

Starter Stocks

Microsoft (MSFT -1.84%)

You're no doubt familiar with Microsoft and its signature Windows operating system and Office product suite, offering workplace staples like Word, Excel, PowerPoint, and more. However, the company has grown to much more than that, becoming a leader in cloud computing through its Azure service, producing innovative hardware like Microsoft Surface and HoloLens augmented reality glasses, powering video games through its Xbox platform, and powering job hunts through LinkedIn.

CEO Satya Nadella has led the revitalization of Microsoft in recent years. The company transitioned its Office software to a subscription-selling model known as Office 365, which has improved both sales and margins for the company. Meanwhile, Azure's returns are up more than 14-fold over the past several years, along with robust growth across the company's other initiatives. As a result, Microsoft holds nearly $40 billion in net cash and enjoyed $33.6 billion in free cash flow over the past year. With those types of numbers, strong leadership from Nadella, and a long runway of growth across its business, Microsoft should deliver returns to investors for years to come.

PayPal (PYPL -1.83%)

From its early days as the most popular payment platform on eBay, PayPal has grown into one of the world's leading digital- and mobile-payments technology companies. With its legacy PayPal platform combined with emerging payment platforms such as Venmo, PayPal is among the businesses best positioned to benefit from the world's increasing shift to digital transactions -- what many have referred to as the War on Cash.

By combining an easy-to-use product with an ever-growing list of productive partnerships (including with Uber (UBER -0.89%) and MercadoLibre (MELI -1.98%), PayPal has come to boast more than 275 million active account holders worldwide, including more than 20 million merchant accounts. Because PayPal makes money by pocketing a small percentage of every transaction it handles, it benefits both from growth in active accounts and in the number of transactions per active account; both metrics have consistently expanded in recent years.

In addition to the quality of its products and services, PayPal has a strong competitive advantage as a result of network effects. As more merchants begin to accept PayPal as a payment option, the more valuable PayPal is to buyers and sellers. As a result, more buyers and sellers sign up for PayPal accounts, enticing more merchants to accept PayPal, and so on. Combining these network effects with the coming growth in digital payments around the world makes PayPal a compelling investment for the long term.

Starbucks (SBUX 1.09%)

One of our all-time favorite headlines from the satirical website The Onion is, "New Starbucks Opens In Rest Room Of Existing Starbucks."

While it's a bit of a stretch, there's seemingly a Starbucks on every corner. The company has relentlessly grown its physical footprint as it pushes to be a part of every coffee drinker's routine. It may seem ridiculous, but the results speak for themselves -- the company has over 30,000 locations and is the de facto name in coffee. 

When it comes to learning about how industries work, we like to start with the best-in-class businesses, and Starbucks' management has given investors a master class in how to dominate quick-serve food. But they haven't stopped with physical stores -- Starbucks is also heavily investing in its digital offering and loyalty program, helping the company go omnichannel and build lasting relationships with customers. 

Adobe (ADBE -0.27%)

If you do anything creative online, you know the name Adobe. The company specializes in tools that help digital creatives churn out content.

The company is perhaps best known for its Photoshop software, but it owns a whole suite of Creative Cloud products including Illustrator, InDesign, and Premier Pro. Plus, it owns document-management products like Acrobat and a host of other software offerings. Our team likes to put it simply: If you're creating, publishing, managing, or measuring content, Adobe is the king of the hill. 

One of the reasons Adobe is a particularly attractive business is that it uses the software-as-a-service subscription model. Users are generally billed monthly or annually for access to Adobe's products, leading to high-margin, recurring revenue -- for every dollar of sales, Adobe keeps roughly $0.85 as gross profit. Most importantly though, the software-as-a-service model allows the company to constantly update and improve its software and offer customers bundling options, thanks to its huge portfolio of products, which leads to happy customers and lasting relationships. 

Netflix (NFLX -0.51%)

At this point, Netflix needs no introduction. Chances are you already have a membership to the streaming service or know someone who does. 

Netflix has gone from industry disruptor to tastemaker in only a few years. In building out its library of original content, the company has consistently created pop-culture phenomena with releases like House of Cards, Bird Box, and Tiger King, and pushed the boundaries of entertainment with interactive content like the release of Black Mirror: Bandersnatch

All of this speaks to the streamer's profound grip on the entertainment space. The company counts almost 70 million members in North America and over 180 million worldwide. Netflix is heading toward market saturation in the U.S., so most growth will come from international efforts, but the company has a strategy in place to create localized content to attract international audiences. So long as the company keeps making hits, existing customers will stick around. 

When Should You Sell a Stock?

If it isn't clear already, we're extremely long term in our investing outlook. We tend to denominate time in decades, not days or months. But that's for companies we love, and there are times where it does make sense to sell a stock.

Reason No. 1: Better opportunities

Sometimes, there's nothing wrong at all with a company or its stock; there are simply better opportunities elsewhere. We'll consider selling a less attractive stock (even at a loss!) if we think another investment has stronger prospects.

Reason No. 2: Business changes

There's no way around it: Businesses change -- sometimes significantly. Changes come in all shapes and sizes, including major acquisitions, changes in management, and shifts in the competitive landscape. When this occurs, we incorporate the new information and re-evaluate whether the reasons we invested in the company in the first place still hold true. We'll consider selling if:

  • The company's ability to crank out profits is crippled or clearly fading.
  • Management undergoes significant changes or makes questionable decisions.
  • A new competitive threat emerges or competitors perform better than expected.

We'll also take into account unfavorable developments in a company's industry. Here, it's important to delineate between temporary and permanent changes. In a downturn, financial figures may suffer even for the best-run companies. What's important is how these businesses take advantage of the effects on their industry to improve their competitive position.

Reason No. 3: Valuation

We're all for the long term here, but sometimes, Mr. Market shows our stock too much love. We'll consider selling if a stock's price has run up to a point where it no longer reflects the underlying value of the business.

Reason No. 4: Faulty investment thesis

Everyone makes mistakes. Sometimes, you'll just plain miss something. You should seriously consider selling if it turns out your rationale for buying a stock was flawed, if your valuation was too optimistic, or if you underestimated the risks.

Reason No. 5: It keeps us up at night

It's tough to put a dollar value on peace of mind. If you have an investment whose twists and turns are causing you to lose sleep, that could be a great cue to move your dollars elsewhere. We save and invest to improve our quality of life, after all, not to develop ulcers.

Adding insult to injury, stressing about a stock might cause you to lose focus and make rash decisions elsewhere in your portfolio. Remember, there's no trophy or prize for taking on risk in investing. Stick with what keeps you comfortable.

When to hold

In pretty much every other circumstance, we'll generally recommend holding your shares. Remember, we're long-term investors, and we've put in the upfront work to understand the important drivers of a business over the long term before buying shares. Over the course of what will be a prosperous investing career for you, the market will rise and fall. Recessions and booms will happen. And all the while, you must stay focused on the long term, making decisions based on a rational view of the future. Fear is natural, but it's never a reason to sell.

Congratulations -- you're ready to go out and start investing on your own. While this guide lays out the basic information you need to get started, remember that investing is a lifetime journey. There's always more to learn, and the world is always changing.

For that reason, it's important to stay informed and keep learning. Thankfully, the internet has made access to information easier than ever. Take advantage of content available across the internet, from Youtube to Fool.com, continue your education, and track your investments over time. Use these tools liberally.

You will make mistakes in investing, and that's OK. Investing is hard. Even if you've selected what turns out to be the best investment of your lifetime (think Amazon), the market will find a way to make you think you've made a mistake somewhere along the line. Focus on the principles set forth in this guide, and you can beat the market.

Stay humble, stay patient, stay disciplined, and Fool on!