When it comes to heart health, where you live appears to matter as much as how you live, according to the Heart Foundation.

Its analysis of hospital and health data found those living in Sydney's wealthiest areas – north Sydney, northern beaches and eastern suburbs – have some of the nation's healthiest hearts, while those in regional and remote areas have some of the worst.

"Better heart health is associated with good education, reliable and secure employment, safe and affordable housing, accessible transport, affordable and healthy and food, and culturally appropriate health services and social support," said Adjunct Professor John Kelly, chief executive of the Heart Foundation.

"You get that in north Sydney, Hornsby and eastern suburbs, but you don't get that in the mid-north coast, far west and Orana, New England, north-west or Riverina."