You can find how much funds lose to taxes on their websites.
iShares S&P 500 Index Fund
Click on Fund Fact Sheet link on the left and in the performance history it will show After Tax Held returns--these are your returns as a buy and hold investor after taxes.
In this case, 1.26% Annual Pre-Tax Return and 0.89% Annual Post-Tax Return. 0.37% is lost to taxes... that is quite tax efficient. Just look for ETFs/Funds like that with a history of tax efficiency.
When you sell, you will have to pay capital gains tax... no way you can avoid that. Keeping taxes low is like receiving a 0% interest loan from the government and you might even have a lower tax rate when you retire, which means you get to pocket the difference between your current tax rate and retirement tax rate as well.