These are the best beaches in Massachusetts, according to Foursquare

Crane Beach in Ipswich. —(David Stone/Essex Heritage)

Get amazing travel deals when you sign up for Boston Traveler. Find the perfect getaway, grab special fares for local and international trips, and much more.

Minus a few projected thunderstorms Friday evening, the weather forecast is looking pretty much perfect for the Fourth of July weekend. Some families may head out of town, while others stick close to home, but regardless of where you’re spending the holiday weekend, there will be plenty of people heading to one of the state’s many beaches. But which are the best beaches in Massachusetts?

To find out, we asked the makers of Foursquare, the location-based app that helps you discover new places using recommendations from a community you trust.

Advertisement

To come up with the rankings for the best beaches in Massachusetts, Foursquare used a proprietary algorithm that utilizes three factors:

Visit Popularity — how popular a place is.

Tip Sentiment — whether someone using the app describes a place using positive or negative language.

Explicit Ratings — whether someone gives the place a like, dislike, or neutral rating using the app.

With that in mind, here is Foursquare’s list for the best beaches in Massachusetts.

1. Herring Cove Beach

Province Lands Rd., Provincetown
Rating: 9.21

An artist adjusting his art installation on Herring Cove Beach. —Globe Archive/Julie Cumes

2. Crane Beach

310 Argilla Rd., Ipswich
Rating: 9.18

Brendan, 4, and Marin Cirino, 2, chased oversized bubbles at Crane Beach. —Billy Baker/Globe Archive

3. Nauset Beach

Beach Rd., Orleans
Rating: 9.08

Nauset Beach in Orleans, MA. —Essdras M Suarez/ The Boston Globe

4. Lambert’s Cove Beach

Lamberts Cove Rd., West Tisbury
Rating: 8.95

Lambert’s Cove Beach in West Tisbury, Martha’s Vineyard. —Mass. Office of Tourism/Flickr

5. Race Point Beach

Race Point Rd., Provincetown
Rating: 8.94

Race Point Beach in Provincetown. —Flickr

6. Cisco Beach

Cisco Beach Access Drive, Nantucket
Rating: 8.94

Cisco Beach on Nantucket. —Jay Colbath

7. Menemsha Beach

Basin Rd., Chilmark
Rating: 8.94

The remains of the “Orka”, the boat featured in the filming of ‘Jaws,’ on Menemsha Beach. —Globe Archive Photo

8. Good Harbor Beach

Nautilus Rd. (at Beach Rd.), Gloucester
Rating: 8.93

A boy catches a wave at Good Harbor Beach. —Henry von Thaden Photography/Globe Archive Photo

9. Hyannis Yacht Club

490 Ocean St., Barnstable
Rating: 8.91

Boats anchored in front of the Hyannis Port Yacht Club. —Matt Wade/Flickr

10. Madaket Beach

20 N. Cambridge St., Nantucket
Rating: 8.89

Madaket Beach at sunset. —Stan Grossfeld/Globe Staff