It is an interesting question. I did the sums a while back, in order to convince myself it was OK to buy a G40. At current prices it costs me about £20 for a 20 litre batch, ie 50p a bottle (£6 for 5kg Golden promise, £1.50 for 500g crystal, £3 yeast, £8 for hops, £1.50 odds and sods).
A nice beer in the supermarket is typically around £2.00 a bottle, £1.50 saving, means that after 600 bottles I have broken even. That is 15 batches, which for me is about 18 months. I've had it that long already.
It is a hobby, and it is fun, and that is why most of us do it. But it is nice that - unlike the vast majority of hobbies - you recover any investment fairly quickly.
I honestly don't know how it compares for price with kits or extract (which I guess was the actual OP question - oops sorry), as I went all grain 30 years ago, but I do know I wouldn't want to go back to kits or extract.
Cheers!