I use a "rule of 20".
Generically, each succeeding "class" or "size" or whatever of ship costs 20 times the previous "class" or "size" or whatever.
Additionally, military ships are treated as automatically being one "class" or "size" better than a civilian ship which is otherwise similar.
So, for example, two ships, a fighter and some sort of utility or tug vehicle, both being approximately the "same" in size and power ratings. The fighter, being military, costs 20 times more than the utility vehicle, which is civilian.
So, a small cargo vessel or trader one step up from the utility vehicle would cost the same amount as the fighter.
A larger cargo vessel would cost twenty times that of the smaller vessel.
And so on.
Beyond that, you've also got cost relationships based on the technology of the ship. A raider isn't going to be worth as much as a Sentri, even though they're of the same essential type or class.