two big cost factors are live sand and live rock. With live rock costing as little as $3/lb online or as much as $10/lb locally you can see where that can rack up costs fairly quick. If you get all live sand that aswell can get costly or you could suplment live sand on top of dead/dry sand.
Other cost factors are circulation pumps, the lights, continual salt cost, and electrical costs.
As a general rule fish only systems are cheaper than reef systems because you can get by with less light and you have less money invested in tank inhabatants.
For a 30 gal
tank If you had to purchase everything new I can see it easily costing $600+. Now if you already have the tank and the stand then part of that money has already been invested into the system.
Also also depends on your area. You might be able to buy some components of your tank for less than if you lived in other areas.