Vanguard Group Inc., the largest U.S. mutual-fund firm, attracted more money from investors in the first 10 months of 2014 than it has in any full calendar year in its 39-year history.

The company received $164.3 billion in subscriptions in its mutual funds and exchange-traded funds through October, John Woerth, a spokesman for the Valley Forge, Pennsylvania-based firm, said yesterday in an e-mail. The firm got $141 billion in 2012, its previous high.

Vanguard, which unseated Fidelity Investments as the biggest mutual-fund company four years ago, is benefiting from investors’ preference for indexing over active management. Equity mutual funds that track indexes attracted $85.8 billion this year through September, compared with $2.5 billion for funds that pick stocks, according to Chicago-based Morningstar Inc. Stock ETFs, which are almost exclusively passive products, received $87.2 billion in subscriptions.

“The investing public is smart, recognizing that costs matter,” Woerth wrote in an e-mail. “As such they are beating a path to the low-cost leader’s door.”

Vanguard’s mutual funds charge an asset-weighted average of 15 cents for every $100 invested, compared with 70 cents for the mutual-fund industry, Morningstar data show. The firm was founded by John Bogle in 1975 on the idea that most professionals can’t beat the market.

Berkshire Hathaway Inc. Chairman Warren Buffett gave the company an endorsement in March in his annual letter to shareholders. Buffett said he told the trustee managing his affairs that after his death he wanted 90 percent of the cash he leaves for his wife put into a very low-cost Standard & Poor’s 500 Index fund.