Good eggs (by good I mean fresh with orange yolks and good integrity between the membranes) at market or from the store cost you $4 to $5 a dozen. Actually, I have never found eggs at the grocery store I consider "good" by the above description. I have seen "good" eggs for $5 a dozen at the farmer's market, or usually from $3-$5 direct from a farm (and then you have to factor in drive time, etc).
A good laying hen costs you $2-$5 and lays 4-7 eggs a week - less in the winter, more in the summer. Let's say roughly 20 dozen eggs per year, per bird. So, 3 birds would more than supply a dozen a week, and 4 birds would have you set (assuming you are a practicing omnivore and eggs are not your primary source of protein).
From what I can gather, 3-4 hens will need, in addition to free range and food scraps, 50 pounds of feed every 3-4 months. It seems a bag of feed is somewhere between $12-$15 dollars. I imagine it would be cheaper if you bought bulk single grains and mixed them yourself.
Let's price it on the upper end: $20 for four birds, $60 for a year's feed, say another $30 for treats, bedding, etc. That makes $110 for 80 dozen eggs, or $1.38 per dozen. The sites I looked at priced the dozens higher based on additional costs which made it more like $2.40 a dozen (um...still cheap!). Of course, there is the start-up cost of building them some sort of roost and run, the costs of which will vary depending on how much you want to find/reclaim and do yourself. So the first years might not be a savings if you wanted to "go all out" and build a beautiful hen house and buy expensive retail feed.
It seems to me that excessive grain costs are silly, as free-ranging hens would really be eating bugs and scraps from your own table. Can you buy bugs to feed hens? I do not know. I also read of additional costs if you raise the chicks with heat lamps yourself. I know that animal rescue centers and Craigslist offer full-grown laying hens for $4-$5 a hen. Then there is no concern about chicks dying, nor accidentally getting a rooster, as well as no additional costs of raising and feeding animals who are not laying.
I do not think there would be such a strong urban chicken movement if there were not cost incentives, so it seems to me backyard chicken farming is a good investment.
Thoughts? Corrections? I am just looking into the idea of urban chickens and do not claim any level of expertise here.