How is city maintenance calculated?

You can build new cities within the first 4 tiles from you capital without paying maintenance. So a city on the 3th and 4th tile from your capital are without upkeep for distance, you cannot place cities closer. To make things easier you can say for each additional 4 tiles you pay an extra gold.

You can actually place 8 additional cities without paying upkeep for distance to palace around your capital.

Gato Loco on civfanatics.com has done some further in depth research on the topic: http://forums.civfanatics.com/showthread.php?t=138473


Apart from the factors that drive up maintenance costs, there are also factors that lower them: Building a courthouse reduces the distance-from-capital cost by 50%. Adapting communism reduces it to zero.