i did some checking:
cities have 6 base defense
each population point adds 1/4th a point of defense
defense increases exponentially with number of techs, it takes something like 12 techs to add 1 defense initially, you get next point after about 4 then 3 etc, until you in later eras you get a point every tech and a couple later ones give two points. all techs grant 48 points of defense.
being on a hill grants a 1.15 multiplier, rounded up.