When you had to split something as a kid, that generally didn’t feel like a perk. But when you’re an investor, splitting can be a good thing.

Stock splits are a way a company’s board of directors can increase the number of shares outstanding while lowering the share price. They’re a tactic for making a stock more attainable to smaller investors, particularly when its price has ratcheted sky-high over time. In 2014, Apple did a split that took its stock price from about \$650 to \$90 overnight.

While neither the company’s value nor that of your investment changes in a split, it’s important to understand how stock splits can impact your portfolio. Here’s what you need to know.

Pizza to the rescue

Stock splits are accompanied by somewhat confusing arithmetic, such as “2-for-1” or “3-for-2.” As with many things in life, pizza can help.

Imagine a company’s value represented by an entire pizza. When its stock began trading, that pizza was sliced into a finite number of pieces, or shares, that were offered to investors. For simplicity’s sake, let’s say the pizza was divided into eight slices and you owned one share.

If a company announces a 2-for-1 split, the number of shares doubles, so the original pie will be divvied up into 16 slices. Whereas you owned one-eighth of the company before, as a result of the split you’ll now own two-sixteenths. Same amount of pizza, just a different number of slices.

That same principle is applied no matter what the split ratio is. That 2014 split of Apple’s, for instance, was a 7-for-1. (Have an appetite to learn more? Check out some other stock market basics.)

So … I’m rich?

Not quite. The company’s market capitalization, equal to shares outstanding multiplied by the price per share, isn’t affected by a stock split. If the number of shares increases, the share price will decrease by a proportional amount.

If a stock traded at \$100 previously, it will trade at \$50 after a 2-for-1 split. Yes, you own more shares, but they’re each worth less. It’s basically a draw, and the value of your investment won’t change.

However, investors generally react positively to stock splits, partly because these announcements signal that a company’s board wants to attract investors by making the price more affordable and increasing the number of shares available. As a result, your portfolio could see a handsome benefit if the stock continues to appreciate. Studies show that stocks that have split have gone on to outpace the broader market in the year following the split and subsequent few years.

Intercontinental Exchange, owner of the New York Stock Exchange, announced a 5-for-1 split in August 2016, which propelled its price to a record high. Since the split took effect in November, Intercontinental Exchange’s stock is up 21%, compared with a gain of about 16% for the Standard & Poor’s 500 index during the same period.

Where do I sign up?

Not so fast. You need to be a shareholder by a certain date, specified by the company, to qualify for a split — and trying to predict the next split would likely be a fruitless endeavor. For one thing, some stocks have never split, such as Warren Buffett’s Berkshire Hathaway, which trades as of this writing at more than \$255,000 a share. No, that’s not a typo. Even as stock prices have surged in the past eight years, splits have become increasingly rare.

In 1997, 102 companies in the S&P 500 — or about 1 in 5 members of the index — did a stock split. The tally was eight last year, and through early July of this year, it was only three, according to data compiled by Howard Silverblatt, a senior industry analyst at S&P Dow Jones Indices.

One of the splits this year was of the “reverse” variety, which, as the name suggests, goes the opposite way: The number of shares is reduced, but the price per share increases. This is often done to meet the minimum stock price required for a company to be listed on an exchange.

Stock splits have fallen out of favor as companies and investors alike have become accustomed to higher stock prices, Silverblatt says.

“That said, some boards still have a trading range for their issues, and given the current levels, I would expect more stock splits once uncertainty drops — with the key question being when that will be,” he says.

» Need a new home for your stocks? Check out NerdWallet’s best brokers for stock trading.

There’s been a split in my portfolio — now what?

Even though the biggest companies aren’t splitting today, that doesn’t mean you won’t encounter a split. Smaller companies undertake this type of corporate action, and exchange-traded funds can split, too. If a stock or ETF in your portfolio splits, don’t make a knee-jerk decision that you may regret down the road.

Instead, decide whether your original investment premise has changed as a result — or revisit your stock strategy now. If it hasn’t, step away from the computer. Given the historic performance of stocks post-split, your best bet may be to sit tight.

If you disagree with the company’s decision to raise its price in a reverse split, for example, it may make sense to sell — but consider these questions to ask before selling a stock before you do so.

Stock splits can be a good opportunity to learn more about how the stock market works while keeping you engaged in your investments. At the very least, they can be a reminder of the value of pizza.

Anna-Louise Jackson is a staff writer at NerdWallet, a personal finance website. Email: ajackson@nerdwallet.com. Twitter: @aljax7.