I paid $121 for 27 chicks, nearly $4.50 a chick but I got exactly the breed I wanted in the varieties that I wanted and my chicks were vaccinated. From the hatchery you pay more for shipping and packaging, sexing, and the guarantee that (while only hatchery quality) they are purebreds of the breed you want, and vaccinations for a little extra $. Mixed barnyard chicks are usually cheaper because they are mixed breeds, no shipping cost, and straight run so you have a 50/50 chance of roos. Although the hatcheries can only guarantee 90% accuracy, you do mostly get pullets. Some people will get a cockerel but you have to figure that 90% accuracy means that 10 out of every 100 might be a cockerel. It's good odds that you won't get one of those 10. When I bought from the hatchery they also sent me 2 extra chicks in case I lost some and my free rare chick, making it 31 chicks. Even then, when I did lose two they reimbursed me for those that died in transit.
If you just want layers then it doesn't really matter if you get mix chicks from another small farmer, but if there are certain breeds you prefer then the hatchery (or even better a show breeder) is the way to go.