Consumer Reports tested 22 sprays, creams and lotions, including ones from Banana Boat and Coppertone.
"One of the things testers looked at was whether the product protected against UVB radiation. That's what causes sunburn and what the SPF number refers to," said Ginger Skinner of Consumer Reports.
Another potential danger from the sun is UVA radiation, which can cause cancer and also ages skin, penetrating even deeper than UVB rays.
"The testers also evaluated how well the sunscreens block UVA radiation. There's still no standardized labeling system, so most just say they've got UVA protection," said Skinner.
To test, sunscreens are applied to people's backs at an outside lab. Then they're subjected to either UVA rays or UVB rays.
And since swimming in the water can wear off sunscreen, Consumer Reports tested for water resistance as well.
"We did find a number of sunscreens that provided excellent protection against UVB rays and very good protection against UVA radiation," said Skinner.
They found two at a good price: Up & Up Sport, a spray from Target with SPF 30 and Equate Baby lotion from Walmart, with an SPF of 50.
When you're at the beach, remember to reapply sunscreen right after swimming or about every two hours.
Consumer Reports said it's best to apply sunscreen about half an hour before you head outside. And even when using sunscreen, it's a good idea to limit the time you spend in the sun, especially in the middle of the day.