According to the Clash of Clans wiki the total cost of upgrading everything is 1,688,882 gems which works out to be $12,068.77. Now that is assuming you have 2,860d 5h 7m to spare because the cost estimate is for build only and does not take into account speeding any of the build times up.

Check out the link here for an explanation of how time plays into the mix as well as how much each level costs in both resources/gems/real money.

http://clashofclans.wikia.com/wiki/Cumulative_Costs