PHOENIX — Scottsdale is among the top 20 most caring cities in the country, according to a personal finance website.

WalletHub ranked it No. 15 in its list of 100 U.S. cities.

Madison, Wisconsin, took top honors, while Laredo, Texas, ranked last.

Other Arizona cities included in the ranking were Gilbert (No. 24), Chandler (No. 32 ), Mesa (No. 61), Phoenix (No. 78), Glendale (No. 81) and Tucson (No. 83).

Is your city one of the most #caring in America? Find out how it ranks here: https://t.co/8UQH2N8T8R pic.twitter.com/qXLACEUuu4 — WalletHub (@wallethub) December 17, 2018

The scores were based on three factors: caring for the community, caring for the vulnerable and caring in the workforce.

Scottsdale was the top state for caring for the vulnerable, which was based on factors like child and adult poverty rates, the share of sheltered homeless people and number of animal shelters per capita.

All Arizona cities included in the ranking except Tucson tied for having the lowest percentage of population doing favors for neighbors.

Nationally, Scottsdale was ranked as having the fourth-lowest percentage of workers who carpool, and Gilbert had the second-lowest child poverty rate.

Follow @KTAR923