If you are looking for the perfect beach, a tourist expert has devised a mathematical formula to help you.
BEST BEACH FORMULA
A = Beach quality
W = Weather
E = Entertainment
C = Culture
V = Activities
F = Friendliness
S = Shopping
T = Travel time
TC = Cost as % of annual income
St Ives in Cornwall and Whitesands beach in Pembrokeshire have both been ranked in the world's top 20, under the formula developed by Dr Dimitrios Buhalis at the University of Surrey.
A total of 250 resorts were judged on factors including beach quality and friendliness of local people.
The list has been published by online travel firm Opodo.
Tourism officials hope the ranking, under a formula which included predictions for this year's hot weather, will help bring in more visitors.
The top rated beach in the UK was at St Ives in Cornwall, which ranked fourth in the world.
Whitesands was listed 18th behind Copacabana in Rio and St Tropez but ahead of Bora Bora and Natadola in Fiji.
Whitesands is one of the top 20 beaches in the world, report says
The next Welsh beaches in the list were Rhossili on Gower and two more Pembrokeshire beaches - Tenby and Barafundle not far behind.
The formula takes into account scenery and the beach's popularity as well as more measurable qualities such as its facilities, activities, weather, and length.
Other factors include the time of travelling to the beach, and more surprisingly the quality of the shopping and even the friendliness of local people.
Dr Buhalis said of Whitesands: "It's a lovely beach and the hot weather this summer is another factor."
He said UK resorts which offered reasonable travel time and cost could benefit from weekend toursim.
"We're finding increasingly that people are taking two, three, even four holidays a year. This may be a couple of weeks for a long-haul holiday, but people are also going for short breaks in the UK."
Pembrokeshire Council said it was delighted that the beach, popular with surfers and campers, had been judged one of the best.
Councillor Rob Lewis, who has responsibility for tourism in the cabinet, said: "It's a fantastic beach in a wonderful, unspoilt area, and we work very hard to keep it that way."
1 Tuscan Riviera, Italy
2 Tarifa, Spain
3 South Beach, Miami
4 St Ives, Cornwall
18 Whitesands, St Davids
19 Bora Bora, French Polyn
20 Natadola, Fiji
Matt O'Brien of the St Davids-based TYF adventure centre said their instructors had worked and travelled in different parts of the world but Whitesands compared well.
"Once you've been here you appreciate how nice it is and our water sports instructors have been to the best beaches in the world and they keep coming back.
"It's good to go on holiday to somewhere new, whether it's Fiji or Barbados but to have something here which is regarded as world class is important."
A spokeswoman for the Wales Tourist Board said: "It's interesting to see that the winning formula not only includes beach quality but that factors such as culture and history and friendliness of the local people".