Anyway, let's move on to the topic of revolts. A revolt in a city can occur if the owner of the city and the person who would own the underlying square if there were no city are different. In other words, a city might revolt if a neighboring city belonging to a different civilization has it within its cultural radius and that civilization's plot culture under the city is greater than the city's owner and that of all other civilizations with a city in range. You don't have to have a majority, you just have to have more of your nationality than the other guy. If a revolt can occur, there is a flat 10% chance each turn of making a revolt check.
During a revolt check, a random number between 0 and the city's revolt power is compared with the garrison strength. If the number is greater than the garrison strength, the city revolts. Barbarian cities always fail this check, so will always revolt. If a city revolts there are several effects. All units in the city lose half their current hit points, the city's cultural radius becomes 0 and it produces nothing for a certain number of turns. Also, there is a possibility that the city may change sides (called a flip). A barbarian city will always flip, period. A non barbarian city won't flip if this is the first revolt (there is always one warning revolt). It also won't flip if the option "no city flipping" is on (this by default is off). It won't flip back to someone who has previously owned it, regardless of reason for ownership change, unless the game option "city flipping after conquest" is enabled (this is by default off). If a city flips, all units belonging to enemies of the new owner are destroyed. If the units aren't at war with the new owner, they simply get expelled unless the new owner has open borders with the units' owner.
So, how is revolt power calculated? The base revolt power starts at 1 and then two factors are added. The first is 2x the city's highest ever population. The second is the number of directly adjacent squares that the revolting people's civilization controls times the current game era. Current game era is considered to be the average era of the remaining players, rounded down, with ancient being considered '1', medieval '2', and so on. So, in the final era (6), if the side the city wants to revolt for controls all 8 squares around the city, this could be as high as 48.
The base revolt power is then multiplied by several factors. The first is the ratio of the two sides' plot culture for the city square. The formula for this multiplier is 1 + ((revoltCulture - cityOwnerCulture) / (revoltCulture)). This would be a number between 1 and 2, being near 2 if the revolt's plot culture is much higher than the owner, and being near 1 if the two are almost equal. If the revolt's plot culture is twice that of the city owner (i.e., 67% revolting nationality, 33% owner nationality), the value would be about 1.5. Sorry for the ugly math, but I can't find a way to explain it more simply at the moment.
Fortunatly, the other multipliers are a bit simpler. If the revolting civilization's state religion is present, the value is doubled. If the city owner's state religion is present, the value is halved. If both are present, these two multipliers cancel each other out. If somebody doesn't have a state religion, they don't get a multiplier.
The city's garrison strength is also simple. Start at 1 and add the cultural garrison strength of all units in the city, regardless of ownership. Double this if the owner and revolting civilization are at war. The only catch is that cultural garrison strength can't be found in game, so here is a list of unit values:
warrior, quecha: 3
archer, skirmisher, axe, spear, phalanx, chariot, immortal, catapult: 4
swordsman, jaguar, praetorian, horsearcher, keshik, war elephant: 5
mace, samurai, pike, longbow, crossbow, chokonu, knight, camelarcher, conquistador: 6
musketman, musketeer, grenadier, cannon: 7
rifle, redcoat, calvalry, cossack: 8
machine gun: 9
infantry, SAM infantry, gunship, artillery: 10
marine, SEAL, tank, panzer: 12
mech infantry, modern armor: 16
Note that ships, planes, workers, great people, and other non-military or non-land units don't help keep a city under control.