boston — David Kalayjian has lost a million dollars in the stock market. Twice. And now he can smile about it.

The retired orthopedic surgeon from Middletown, Conn., and his wife saw much of their investments vanish in the early 2000s tech bust, and then again during the 2007 housing market crash and ensuing recession. Dr. Kalayjian isn’t easily spooked, though. He pulled out of the market during the last downturn – fortuitously just before it plunged 500 points in one day – but was only on the sidelines for a few months. Then, with gentle encouragement from his financial adviser, he tiptoed back in when the market was near the bottom.

In the five-plus years since, Kalayjian has made back all of the money he lost and averaged an annualized growth in his portfolio of 10 to 11 percent. His current net worth stands at about $6 million. “It’s been a good run,” he says.

Judy Collins has been less fortunate. A public defender in Miami, she hasn’t been able to amass any savings and couldn’t take advantage of the current run-up in the stock market. Besides, she watched two of her sisters lose more than $1 million in the market crash six years ago and finds all the talk about price-earnings ratios and Fibonacci lines bewildering.

Kalayjian and Ms. Collins represent two different sides of the great bull run on Wall Street – ones that hold important implications for the finances and sociology of the nation.

As the stock market rise enters its sixth year – now becoming one of the longest bull markets in US history – it is benefiting Americans unevenly. Coming as the rest of the economy has stagnated, the boom has bolstered the fortunes of wealthy investors like Kalayjian while many other people, like Collins, have garnered no rewards at all.

To a large extent, this is the way it has always been on Wall Street. The rich, because they have money and access to savvy financial managers, can use the stock market as their own personal bank vault more than other people. But this time around, the disparities have been more pronounced. That’s because many Americans either sat out the latest boom, invested in it too late, or, as is the case of many Millennials, seem wary of Wall Street altogether.

Indeed, in 1998, near the end of the last long bull run, 60 percent of Americans owned stocks, according to a Gallup poll. Last year, that fell to 52 percent – the lowest level since Gallup began surveying stock ownership 16 years ago. “In terms of who benefits from the stock market boom, it’s basically the rich,” says Edward Wolff, an economist at New York University (NYU).

To be sure, analysts point out that a strong market, even one that lopsidedly benefits the wealthy, is better for everyone’s portfolio – and the overall economy – than a weak market. That could be argued as true again this time. The Federal Reserve, with its loose monetary policy that has kept interest rates low, has been a prime driver of the stock market boom and has helped spur at least a modest recovery in the jobs market.

But even if the Fed can be credited with some success at reviving growth, the current bull market is being met with nagging doubts – ones intertwined with the ascendant issue of income inequality.

Is the market overvalued and propped up more by the Fed than by a truly healthy economy?

Are ordinary Americans failing to get their slice – albeit a small one – of the market’s gains through 401(k)s and IRAs?

Is the divide between Wall Street and Main Street growing?

• • •

The current run-up in stocks has certainly been impressive. It began in March 2009, just two months after Barack Obama was first sworn in as president and just as “Slumdog Millionaire” was winning the Oscar for best picture.

According to Ari Wald, an analyst at Oppenheimer & Co., August will mark the 64th month (5.3 years) of the bull market. It has become the fourth longest run without what economists call a “major correction” – a dip of 20 percent or more in value – in 85 years, since before the Great Depression. The longest bull market, in the 1990s, lasted more than 10 years. The market climbed for more than seven years in the 1950s and 6.2 years in the 1970s. Another notable bull run, in the Roaring ’20s, stretched over almost nine years and then plunged 90 percent in the crash that began in 1929. The current run-up, although steady, hasn’t been as strong as some of its recent predecessors. The bull market from 1982 to 1987 rose 229 percent, while the prolonged 1990s climb increased 582 percent. Through July 30, the current bull market is up 191 percent.

What this market hasn’t shown in strength, however, it has made up for in resilience. It has survived the lingering financial crisis in Europe and an anemic recovery in the United States. It has pushed on despite the Arab Spring, wars in Syria and Afghanistan, new bloodshed in Iraq, and Russian forays into Ukraine.

One reason for its longevity is simply what it followed: A sustained period of growth often trails a deep economic downturn. “We were coming out of the worst recession in 75 years, so it isn’t difficult to believe we were going to go this long,” says Chuck Self, chief investment officer at iSectors, a quantitative modeling service for financial advisers based in Appleton, Wis.

Even more than with stock rallies of the past, Federal Reserve policy in the wake of the Great Recession has played a major part with this surge, with the Fed buying up bonds and keeping interest rates at historic lows. Many analysts say quantitative easing drove up the price of stocks and bonds, making the yields on bonds less attractive and forcing more investors into the equity market. The Dow regained all of the wealth it lost during the recession early last year.

Unlike the ’90s bull market, when tech stocks led the charge, this bull market has also been broad-based. “For the first few years, it was a typical cyclical recovery: Industrials and financials all performed,” Mr. Self notes. “Now, we’re on the phase where more value stocks like energy, health care, and utilities are performing. In that sense, the bull market is more sustainable because there hasn’t been one sector driving it.”

Debate swirls in the canyons of Wall Street about how long the market rise will last. Almost hourly, some analyst is predicting an imminent correction. Some economists think the loose Federal Reserve monetary police has artificially propped up the market and will lead to a sharp downturn. Others think the market is just overvalued and due for a conventional pullback.

Not everyone is pessimistic, though. Mr. Wald, for one, believes price levels in this bull market are more in line with their actual values. “In the ’90s, p/e ratios [a company’s share price compared to its per share earnings] were phenomenally high, in the 100s for tech stocks,” he says. “Now they’re more like 15 or 16, so even though the market is hitting new price highs, it’s being supported by better earnings.” He thinks the bull market could continue for another four to five years.

Still, given what investors went through in the last pullback, celebrations have been tempered even as the major market indexes have been breaking records. “Every year, people have been trying to call the top, not embracing it as they did during the tech bubble,” Wald says. “To me, that’s one point that’s actually a positive for it. There’s not that one-sided euphoria.”

There’s another reason fewer people are celebrating, too: Fewer people are benefiting.

• • •

Collins, the public defender, had begun to put money into a retirement account while she was working in a previous career in marketing. She had saved up about $75,000. But she used most of that money to pay for law school. Now she admits she may have to find a new job to be able to afford retirement – or else “end up living with my sisters.”

But even if she had more resources, Collins wouldn’t necessarily put them into stocks. She saw what happened to many people in the 2008 downturn.

“I didn’t lose anything when the market crashed,” she says. “I still have some nice shoes.”

Her views aren’t unusual. Stock ownership surged in America in the 1980s and ’90s. That was due in part to the rise in defined contribution plans, as more companies dropped pension programs and replaced them with 401(k) and other kinds of individual retirement accounts. These gave more individuals a direct stake in the stock market.

At the same time, the growing popularity of discount brokerage houses, such as Charles Schwab, and online trading platforms, such as E-Trade, made stock trading more accessible to the masses without the need for a high-priced professional. Stories circulated widely of riches being made off booming technology stocks. A day-trading culture flourished, often with Dickensian results for those who made the wrong picks.

But more recently stock ownership has declined – particularly since the Great Recession – as more people have become anxious about navigating the market. In a 2013 paper, Mr. Wolff of NYU found that only 22 percent of American households had $25,000 or more invested in the stock market as of 2010 – down from 27 percent in 2001. “The share of households with any type of substantial holding is pretty minimal,” he says.

Investors with small portfolios, minimal investing experience, and limited access to financial professionals are often hesitant to reenter a market after a sharp downturn. Typically, the person who takes advantage of a bull run is one “who has the money and the knowledge to look five to seven years down the road,” says David Richmond, founder and president of Richmond Brothers, an investment firm in Jackson, Mo. “If not, you get the pants scared off of you.”

Another reason many people have been reluctant to jump back in has been the faint state of the economy. When people are struggling just to pay their mortgage, it’s hard for them to think about contributing to their 401(k), much less buying the latest initial public offering.

The middle class lost an estimated 47 percent of their net worth between 2007 and 2010, and they have been slow to gain it back. Much of their wealth is tied up in home values, which haven’t recovered as quickly as equities. Similarly, even though job numbers have finally rallied to pre-recession levels, many of the gains have been in low-wage or part-time positions.

Compare all this with 1998, near the tail end of the frothy bull run of the 1990s, when the unemployment rate was just 4.6 percent, the housing market was robust, and consumer spending was high.

“I distinctly remember the last day of 1999,” says Kalayjian. “Everyone was worried about Y2K, and I remember looking at the stocks soaring on TV and thinking, ‘this is too good to be true.’ ”

He turned out to be right. The market tanked a few months later.

That downturn and the one in 2008 left an indelible mark on certain demographic groups. Many baby boomers were nearing retirement and didn’t want to risk any more of their savings, already deeply diminished, on the stock market again.

“They’re saying, ‘I can’t go through another 2008. I don’t have time to wait around to break even,’ ” says Mr. Richmond.

Perhaps even more unnerved were people in their 20s and 30s, who were just starting to earn enough money to invest but had now witnessed two swoons on Wall Street. Coming of age in the wake of 9/11, which made the whole world look more unsettled, only added to their sense of unease. In some ways, younger investors echo the generation that reached young adulthood in the 1930s, many of whom didn’t want to invest in stocks after the Great Depression.

“It’s like someone that gets seasick the first time they go on a cruise,” says Greg McBride, Bankrate’s chief financial analyst. “They are not in a hurry to get back on that boat.”

According to Gallup, only 27 percent of 18-to-29-year-olds owned stock in 2013 – down from 33 percent in 2008. A Bankrate.com survey released in July found that adults ages 18 to 30 were the least likely to choose stocks as their primary investment vehicle for money they planned to keep 10 years or more.

Many Millennials who are investing in the market are acting cautiously. Adam Galatioto, a young acoustical engineer from Astoria, N.Y., is putting only about $70 a month into his 401(k) at work, though it is 100 percent allocated in stocks. He has a second account, an IRA through an outside firm, that is better funded but less aggressive: 60 percent stocks, 40 percent bonds, through a mutual fund.

“The market isn’t built for me,” he says. “It’s built for the people who built it. I invest because it is the only way to get a return on my money.”

His sentiments contrast sharply with the climate in the go-go ’90s. Back then, the financial press was busy explaining the relatively new world of 401(k) accounts. Little investors were teaming up with Wall Street firms to create portfolios that in theory would underwrite their retirement on a Caribbean island or mountain retreat – and soon. Others cashed in on surging dot-com stocks on their own.

Today, the news is more likely to be allegations of how international banks rigged interest rates in the Libor scandal. Or about how hedge funds use algorithms to make money in ways that “little investors” can’t. Or about platinum Wall Street bonuses.

“The euphoria of stock trading was more rampant then than it is today,” says Richmond. “The thought was investing back then was easy, that you could throw a dart at the board and make money.”

• • •

None of this seems to havediscouraged the wealthy about equities. In some ways, that isn’t surprising: The rich typically have a higher proportion of their wealth in investments, and stock ownership overall is heavily concentrated at the top. The Pew Research Center estimates that the wealthiest 10 percent of households controlled more than 80 percent of stocks and mutual funds as of 2010.

Both Richmond and Philip Lee, a manager at Modera Wealth Management in Boston, say that their clientele today is typically wealthier than it was six or seven years ago.

“A subset of folks were kind of flipped out [after 2008], and went more conservative,” says Mr. Lee. “People who could afford to think about their long-term plans did well.”

People with a lot of money in their portfolios can afford to absorb the shock of short-term losses. They can also pay for top financial advice and usually have enough resources to create a diverse portfolio, another protection against sharp pullbacks.

Vijay Boyopati, a former Google employee who is now an entrepreneur in Seattle, weathered the last stock plunge well. He survived in part through a combination of intuition and serendipity.

When an acquaintance at a party came to him with an opportunity to invest in real estate in Las Vegas and Phoenix, he became suspicious of the housing market and shorted his shares in Lehman Brothers and Wachovia, two major housing lenders. Lehman Brothers collapsed a few months later.

Mr. Boyopati was also savvy enough to hedge his bets. “I like to have a whole variety of investments,” he says. “We own a lot of different assets: stocks, treasuries, bonds, and even far-out [investments] like bitcoin.”

• • •

The upshot of the latest bull run is that people like Kalayjian, the retired doctor in Connecticut, have improved their finances, while Collins, the public defender in Florida, may eventually be asking one of her sisters if she can move in. In that sense, the market at the moment is a metaphor for the economy, with the rich getting richer, which has added to inequality levels in the US.

Between 2009 and 2011, the wealthiest 7 percent of US households saw their net worth increase 28 percent, according to a Pew Research Center study. The net worth of the bottom 93 percent, in contrast, fell by 4 percent. After shrinking slightly in the recession’s early years, income inequality is now at historic levels: The gap between the top 1 percent of earners and everyone else is the widest it’s been since 1928.

This is a phenomenon that has been building for three decades, caused by a multitude of factors: the decline of unions, the movement of jobs offshore, educational inequities, technological advances that have replaced workers, uneven tax policies. But the stock market has played a role, too – however tangential – allowing the rich to add to their bank accounts in moments like the current bull run while wages have stagnated for so many in the middle class.

“I’m surprised the American people have allowed this [income inequality] to go on as long as it has,” says Richard Wolff, a professor emeritus of economics at the University of Massachusetts at Amherst. “I think we’re headed for enormous conflicts in our society for which we aren’t prepared.”

Kalayjian feels empathetic toward those who haven’t ridden the current boom. But he also likes the numbers he sees when he looks at his own portfolio these days.

“I don’t pretend to think everyone benefits from it [the bull run],” he says. “The economy certainly hasn’t. But as an investor, it’s been good growth.”

The question now may be not just how long this bull market lasts, but whether its gains will ripple into a stronger climate for job creation and income growth – even for people who don’t have much in the stock market.

Simone Baribeau contributed to this report from Miami and Elizabeth Armstrong Moore from Portland, Ore.