A tribute to Jack Bogle, founder and retired CEO of The Vanguard Group, is displayed on the bell balcony over the trading floor of the New York Stock Exchange in New York, January 17, 2019. Brendan McDermid | Reuters

If you're a follower of Jack Bogle's legendary investment philosophy, you want to buy low-cost index funds and hold them indefinitely. That is because over time, the Vanguard Group founder's theory goes, that strategy can potentially mimic the market's returns without the high costs that come with other funds. Bogle was considered the titan of low-cost investing. But as investing in environmental, social and governance (ESG) becomes more mainstream, investors may be wondering whether they can still get those same returns while upholding higher social ideals. That is because investing in an S&P 500 index fund, for example, includes companies tied to high carbon emissions, tobacco or firearms. There are new and existing ESG indexes that aim to mirror the broader market while excluding the biggest ESG offenders. Last month, S&P Dow Jones Indices launched its own ESG index based on the S&P 500. The company has issued a license for an ETF that is scheduled to begin in the U.S. in the coming months. Other indexes on the market — including the MSCI KLD 400 Social Index, which dates back to 1990 — aim to help investors get broad exposure while keeping their ideals in mind.

The good news for investors is that the ESG products currently on the market do not necessarily mean you have to sacrifice performance or pay a lot more, according to Jon Hale, head of sustainable investing research at Morningstar. "You can get U.S. large cap, U.S. small cap. There's international versions and there's fixed income versions, all passive, whether it's open end or ETF," Hale said. "And the fees are lower than ever."

S&P's new index

The new S&P 500 ESG Index provides broader exposure than the S&P Dow Jones Indices' legacy index, the Dow Jones Sustainability Index, that was launched in 1999, according to Reid Steadman, managing director and global head of ESG indices at S&P Dow Jones Indices. That legacy index captured the top 10% of each industry's market capitalization. The new index screens out certain companies, but still holds a majority of the market.

"Over time, we saw an interest not in just having ESG as a side allocation, but also actually moving into the core of investors' portfolios," Steadman said. Still, those same investors didn't want to take on huge risks. "They wanted a risk and return profile in line with the market as defined by the S&P 500 index," Steadman said. The new index excludes companies with strong ties to tobacco or controversial weapons or that do not comply with the United Nations Global Compact, an agreement that encourages businesses use sustainable and socially responsible practices. The remaining companies are ranked by a proprietary ESG score. The top 75% of each industry's market capitalization are included. "That results in a performance profile, risk and return profile, that's very much in line with the S&P 500 itself," Steadman said. More from Impact Investing:

Energy-saving solutions let homeowners cut costs

MBA students create the next best impact investing idea

It's not just millennials with socially responsible investing in mind After the most recent re-balance in April, 316 companies remained. Facebook and Wells Fargo, for example, fell out of the index because they had low ESG scores relative to their industry peers. In comparing five-year annualized returns, the S&P 500 came in with 10.9%, while the S&P 500 ESG Index would have been at 10.8%. An undisclosed fund provider will be starting an exchange traded fund based on the index on U.S. exchanges in the coming months. In Europe, UBS Asset Management has already launched an ETF based on the index.

More index strategies