Ok, lets look at it the way an accountant for a business would, assuming a 6 plant grow.
First you have your fixed costs- What did all your basic equipment cost you (lights, pots, fans, hydro stuff (if you use hydro),etc). Lets say $750 (my own basic system was about $100 less with a 400w light). What did your clones/seeds cost? Let's say $75 for 6 clones ($15/each). Next, what is your electricity going to run. You can figure out what your local company charges per kilowatt hour from your bill, and then use this formula to figure your elecrtric bill in advance: (light wattage output / 1000) x electricity cost per kilowatt hour = Operating cost per hour. In my case I use a 400 w light and my KW charge per hour is .107, so it costs me $04.28 per hour to run my light. For 30 days flowering at 18/6 it will cost $23.12, and for 30 days at 12/12 it will cost
$15.40 , for a total of $53.92 for a 13 week grow.
Add it all together and your fixed costs are $278.92 (you could also figure the rent, insurance, etc for the space your growing in, but there's no point going into that unless you're growing commercially).
Now what about variable costs? Other then your labor the only real variable costs your going to have are your nutes, soils, insecticides, etc. You have to estimate you're usage to figure out your costs here (if you used 1/2 of a bottle of nutes that cost $15 your actual cost for the grow was $7.50). This varies a lot depending on what you use and how your growing, so I'm just going to assume you grow in soil and use a half a bottle of each of the fox farm three pack and about 10% of each of the 4 pack supplements. (I'm probably seriously overstimating, but it's better to overestimate costs initially and be surprised when you spend less then you planned on). Based on online and local prices that means another $22.50 for the three pack and $8.95 for the four pack, for a total of $31.45. Just to make it even, lets say your insecticides and other variables (charcoal filters, etc) bring it up to $40. From personal experience I know that it costs about $3 each to plant them in 3 gallon pots using Fox Farm soil, so there is another $18. That puts your variable (non labor) costs are around $58.
That gives you a total cost for the grow of $336.92 over the three month grow period. Now, assuming your plants all survive and you are able to harvest 3 oz from each plant your looking at a total of 18 oz. $336.92/18= $18.71 per ounce. This is a very basic breakdown, but for anyone that's just growing for personal use I think it makes it obvious that you can grow it yourself for far less then you can buy it at the dispensary.