Indoor homegrown can be very cheap or not so cheap, but still likely to be less expensive than that bought at the local Cannabis shop. As an example my local pot shop sells an oz. of flower for $240 to $280 USD. A bare bones grow: no tent, a cheap LED light panel (< $100 USD from Amazon), a bag of potting soil, pot and Autoflower seeds from a good seed bank (cost $5 to $10 USD/seed) plus the electricity to run a 1000w LED panel for 18 hrs a day for ~six months. If you have a window that gets good sunlight and you want to go really cheap the LED light can be eliminated.
With good genetics you can likely get an oz or more of flower from a single plant. Grow several with that setup and the cost/oz really goes down. In round numbers your grow from a single plant is likely to pay for the cost of the grow.
A no tent setup for two or more plants with cheap LED lights:
With autoflower plants you can get at least two grows a year with that set up and likely enough flower to keep you and most of your friends supplied.
The biggest problem with growing Cannabis is it can become a passion, I've said many times growing weed is more or at least as much fun as smoking it. While Cannabis may be "just a weed" there is so much to learn if you want to spend the time. If not, put a seed or three in a pot, water for close to six months, harvest and eat or smoke. It is all good.
Following posts will explore the costs of more complex setups.