You should only use the watts its pulling not the advertised watts on the package.
Good lighting manufactures will post real watts pulled vs theoretical.
The way it gets confusing is if you are using a dimmer, different lights, different lighting on/off periods, length of time lights are on. It only takes in the total wattage of the light and end yields. It's not the best. The hydro use of it all is really where it should be calculated.
A 600w HPS on 24/7 for veg period for 10 weeks is going to cost way more then a 300w LED on a 18/6 for veg.
The longer you veg out, the bigger the plant, the larger the yield. None of these number account for the extras needed like tent fans either.
Thus anyone with enough time/space can get a perfect 1g/w ratio or higher. Also does not account for how efficient LEDS are vs old lighting techs like HPS and HID
On my grows I do a hydro break down.
growdiaries.com/diaries/49742-dinafem-og-kush-autoflowering-grow-journal-by-m0use
The bottom of that harvest comment is the break down I use. I get real into it.
long story short it cost me .20c a gram in electricity for all the usable cannabis that grow yielded.
I include trim as I made edibles out of it. But most people only include buds.
Trim + Buds 0.9 g/w
Buds .69g/w in the traditional ratios.
But grams per KW of electricity used is much better ratio I think.
Hope this helps.