But once you do that, you can maybe get to a reasonable place. The upfront cost being ignored, at today's egg prices, you can basically break even.
I have 9 egg laying chickens. They go through about $30 of food per month. They need another $20 in bedding supplies. $50 / month basically. Plus I spoil them with meal worm treats, so add another $30 per month for that (but I'll ignore that in my numbers below).
In winter, I average about 5 eggs per day out of my 9 chickens. In summer, it's closer to 8 per day. So we'll assume the best case here.
8 per day * 30 days per month = 240 eggs
$50 per month supplies / 20 dozen eggs = $2.50 / dozen
So not bad overall. But in winter it's worse, and my costs are higher because I give them worms.We can't eat through all the eggs though, so we try to find nice people/places to give them away (single moms, food banks, etc.).
Ultimately, raising chickens is just for fun. They are pets and enjoyable creatures. Highly recommend if you have the land for it (and no HOA rules).