A slump in several big companies weighed down the stock market Tuesday, leaving most major indexes lower.

The S&P 500 index fell, as did the Nasdaq composite, which is heavily weighted with technology companies. Gains for McDonald’s and UnitedHealth helped push the Dow Jones Industrial Average higher.

A stark profit warning from Snapchat’s parent company spooked investors into dumping the stocks of major social media companies. Snap sank 43.1%, while Facebook’s parent company lost 7.6%.

On Tuesday:

The S&P 500 fell 32.27 points, or 0.8%, to 3,941.48.

The Dow Jones Industrial Average rose 48.38 points, or 0.2%, to 31,928.62.

The Nasdaq fell 270.83 points, or 2.3%, to 11,264.45.

The Russell 2000 index of smaller companies fell 27.94 points, or 1.6%, to 1,764.83.

For the week:

The S&P 500 is up 40.12 points, or 1%.

The Dow is up 666.72 points, or 2.1%.

The Nasdaq is down 90.17 points, or 0.8%.

The Russell 2000 is down 8.44 points, or 0.5%.

For the year:

The S&P 500 is down 824.70 points, or 17.3%.

The Dow is down 4,409.68 points, or 12.1%.

The Nasdaq is down 4,380.52 points, or 28%.

The Russell 2000 is down 480.49 points, or 21.4%.