Cumulative Costs/Home Village

Summary
The goal of this page will be to enumerate the total costs in time, resources, Gems, and real world money to upgrade everything in the game at each town hall level. In order to do this, some assumptions will have to be made:
 * 1) The cost of gems will be calculated in U.S. dollars using the normal pricing without buying during a sale, but is always calculated at the rate of 14,000 gems per 99.99 dollars, rounded up to the nearest cent. This is because it's assumed that you're buying large amounts of gems. For example, the cost of buying 6,500 gems is considered as USD 46.43, rather than buying a box of gems with USD 49.99. The actual cost will be slightly higher because you'll have some left if you buy large amounts of chests of gems.
 * 2) The cost of resources will be calculated using the most economical means possible. That means 10,000,000 gold or elixir for 3,000 gems and 200,000 dark elixir for 5,667 gems, rounded up to the nearest integer. Again, since it's assumed that you're buying large amounts of resources, this rate is always used. For example, the cost of buying 4,000,000 gold is considered 1,200 gems rather than 1,400 gems. The actual cost will be higher since you can't buy all resources at the highest rate. In order to buy the largest amount of resources at the highest rate, you'll have to rush all resource storages to the maximum level as soon as possible.
 * 3) Consumables will not be counted. The cost and time of building troops and spells is considerable, but also completely impossible to estimate. The same goes for: searching cost; re-arm cost of traps; reload cost of certain defenses; removing Obstacles.
 * 4) The Buildings that already exist at the tutorial will be excluded from Town Hall 1's costs. Also, since the tutorial can't be skipped, and due to the small amount of Town Hall 1 contents, Town Halls 1 and 2 will be merged.
 * 5) The time listed will be total time and not "builder" time. For example, 5 upgrades that each take 1 day to complete would take 1 day with 5 builders. For the purposes of this exercise it will be listed as 5 days. Also, since gearing up uses home village resource but uses the master builder, the costs are listed here, but the builder time for gearing up is listed in the builder base's cumulative costs.
 * 6) Last Updated: The October 2017 Update.

Buying Gold or Elixir with Gems
This calculator is outdated, because it uses 8,001,000 as the maximum Gold and Elixir storage value, but now they're 10,000,000. Also, calculations on this page assume that you always buy large amounts of resources at the maximum rate, therefore the cost of buying 4,000,000 gold is considered 1,200 gems rather the output of this calculator (1,400 gems).

Buying Dark Elixir with Gems
Again, calculations on this page assume that you always buy large amounts of resources at the maximum rate, therefore the cost of buying 100,000 dark elixir is considered 2,834 gems rather the output of this calculator (3,000 gems).

Buying Gems with $USD
Calculations on this page assume that you always buy large amounts of chests of gems, therefore the cost of buying 6,500 gems is considered USD 46.43 rather the output of this calculator (USD 49.99 by buying a box of gems).

Gold Costs (excluding walls)
This information is based on the number available to build and maximum level of each structure at each town hall level. Walls have been separated from buildings because they are so expensive they distort the stats, and now that they can be upgraded with either resource at higher levels it makes sense to treat them separately. See the individual pages for a cost break down.

Elixir Costs (excluding walls)
This information is based on the number available to build and max level of each troop/spell/hero/structure at each town hall level. See the individual pages for a cost break down.

Walls
Beyond level 8 walls can be upgraded with either Gold or Elixir, but the cost to buy either resource via gems is the same. Also note that currently only 100 walls can be upgraded to level 12 at Town Hall level 11.

Dark Elixir Costs
This information is based on the max level of each dark troop/spell/hero at each town hall level. See the individual pages for a cost break down.

Time Costs
The calculations for time costs are somewhat different. You can't simply add up all the times and calculate the gem cost. Since you can't buy extra time, that means the gem cost for each individual upgrade must be calculated and then summed together. This will cause the gem cost to be more expensive then simply putting the times into the time to gem calculator would indicate.

Research times are being separated from build times because there is only one lab. That means you can't speed up overall research times by buying more builders.

Builder's Huts
Builder Huts can only be purchased with gems. You're also given some gems at the start of the game and you get some from achievements.

Decorations
The cost to buy decorations are listed here, assuming that all decorations are bought. However, they aren't considered in the grand total.

Special Packs
If you decide to gem everything, then buying each special pack saves some money. Again, they aren't considered in the grand total.

Total Days
(Builder Time/# of Huts) or Research Time, whichever is longer. Any times with an (R) mean that the research time is longer than the builder time. This means builders will be idle while waiting for research to complete. A 6th builder hut is not currently available in game. Although the idea of a 6th hut is often brought up, it isn't listed here, because in most cases, builders will be idle while waiting for research to complete, reducing the 6th builder's usefulness. If you have all five builders, the total research time is shorter than total builder time. Note that the lab can still work even if under upgrade. Therefore, it's inefficient to wait until literally all of your research upgrades are finished before beginning the Town Hall upgrading, as the lab be idle for the duration of your Town Hall upgrade and its own upgrade immediately after. The "Time Margin" column is the total time of the next Town Hall upgrade and the next lab upgrade measured in days. You should start the Town Hall upgrade if the remaining research time approaches that value.