A SmartAsset study analyzing charitable contributions as a percentage of net income in various places across the nation found that Charleston County ranks second in South Carolina for most charitable places to live.

Charleston residents donate 2.09% of their income to charity, according to the survey, with 13.33% of tax returns itemizing charitable contributions. Charleston County ranks No. 152 in the nation.

Berkeley and Dorchester counties sit just out of the top 10 in the state, with Dorchester ranking 18th and Berkeley ranking 13th, with 1.1% and 1.37% of incomes being donated to charity, respectively.

Two factors were taken into consideration as a part of the study: how much money people donate as a percentage of their net incomes and the proportion of people who made charitable donations. SmartAsset looked at tax return data and accounted for federal, state and local taxes paid for data.

Beaufort County took the top spot in South Carolina with 2.17% of income being donated to charity and 14.05% of tax returns itemizing charitable contributions. Union County ranks bottom with 0.8% of income being donated to charity.