The study looked at a range of factors, including housing affordability, the cost of childcare, safety, schooling, and general quality of life factors such as the number of family-friendly restaurants and days out in order to find the UK's most family-friendly towns and cities.

Locations were scored on their relative performance in each category and scores were totalled to create an overall family-friendly score.

With some of the country's cheapest childcare costs, and generally having a solid performance across most major categories, Preston is ranked the best place to raise a family in 2023.

Narrowly missing out on the top spot, however, was Oldham.

Situated on the doorstep of the Peak District National Park, Oldham finished in the top 10% across multiple categories in the MoneySupermarket study, such as childcare costs, house prices and affordability, as well as finishing third overall for family-friendly dining options.

In third place was Worcester.

Top 10 family-friendly cities:

Preston - 90.3

Oldham - 89.6

Worcester - 89.3

Southampton - 89.0

Hastings - 86.3

Bedford - 85.4

Salford - 85.0

Shrewsbury - 84.5

Maidstone - 84.1

Barnsley - 81.5

Explore the data for the top 50 best UK cities for families, as well as the best places for schooling, family days out and dining here

Ashton Berkhauer, personal finance expert at MoneySuperMarket, said: “While affordability is likely the overriding factor when it comes to buying your first home, there are other considerations that come into play when deciding where to raise a family - or where to retire for that matter.

“While house prices will still play a key role, being close to good schools and local amenities will likely have more of a sway when deciding on a location, as well other things such as proximity to family and friends who might be able to help with reducing the reliance on professional childcare.

“No matter what your house-hunting priorities are, it’s always a good idea to shop around and compare mortgage deals to make sure you’re getting the best deal for you and your individual needs.”