Because there are variables, there is a formula. As always with these things. The formula for BTC per GH/s is
difficulty * 2^32 / hashrate
In order to get the money out of this you just convert the BTC to whatever currency it is
(difficulty * 2^32 / hashrate) / (BTC / currency )
Not quite...
difficulty * 2^32 / hashrate will give you how many seconds you would expect it to take to find a block. The if you took 25 and divided by that number, you'd get how much BTC you'd expect to earn a second. So, to calculate expected earnings per GH/s, this is the correct formula:
25 / (18736441558 * 2^32 / 1000000000) = 0.00000000031067
Therefore, at current difficulty, 1GH/s = 0.00000000031067
BTC/s. This, however, is not what the OP asked. The original question was how to figure out a system's dollar per GH/s, which is simply the cost of the system divided by the hash rate of that system in GH/s. So, if you paid $1000 for a 1TH/s miner, it's $1 per GH/s.
If you want to figure out operating costs, that's easy, too. Just take the rated power consumption of the miner, translate into kw and multiply by the cost of your electricity per kWh like this:
.34 * .10 = 0.034
So, at 10 cents per kWh, a 340 watt miner will cost $0.034 an hour to run, or $0.816 a day. Now to figure out your expected earnings after you've factored in power, you simply take the first number 0.00000000031067 and multiply by 86400 (seconds in a day) to get 0.000026841888 (which is how much BTC 1GH/s expects to earn in a day). Now, convert that to your fiat (I'll use a conversion ratio of 1
BTC -> $590 USD) which is $0.01583671392 per day. So, now that you know how much each GH/s will earn you in a day in USD, multiply the value by the GH/s of the miner and subtract out the daily power costs.
Of course, you could just use the formula I posted and give the appropriate hash rate there (instead of just calculating earnings for 1GH/s) like this (I'm using the Antminer S3 as an example):
25 / (18736441558 * 2^32 / 440000000000 / 86400) = 0.011810256
0.011810256 * 590 = 6.96805104
6.96805104 - (0.34 * 24 * .10) = 6.15205104
Therefore, right now an Antminer S3 expects to make you $6.15 a day assuming $590 per
BTC and $0.10 per kWh power costs.
Oh sorry. I rescanned the whole thread and found out what he meant.. I misunderstood the quesrion. Also thanks for the full formulas, I guess I've been running on the wrong ones.