The best way to get a rough cost estimate is to compare to similar units. For example, Chaos Space Marines have the same stats as Space Marines, but don't have "And they shall know no fear", and the formation doesn't come with transports as default. Likewise, the army's strategy rating is lower. Due to these factors it's logical to price them cheaper than normal marines.
Of course some lists may deliberately make some units over or undercosted to promote or disuade certain list styles. For example the Dark Eldar list has deliberately overcosted unit upgrades to promote multiple small formations.
It also depends on the structure of the list; some armies have deliberately overcosted "core" formations which are cancelled out by slightly underpriced (though more limited in numbers) "support" formations.
As others have mentioned, it's an art rather than a science. You can make a best guess by comparison, but playtest is the only way to be sure.
There is no hard and fast formula, but don't let that stop you giving it a go. Post your list here for comparison and people will notice if any prices seem off
