this article explains the efficiency question well, but it doesn't demonstrate practical application well. See the section about extract yield potential especially.
http://brewingtechniques.com/library/backissues/issue1.3/manning.html
for the practical application, i recommend you buy and read
Designing Great Beers by
Ray Daniels.
but in a nutshell, you calculate grain bills and efficiencies based on gravity units. GU's represent the difference in density between water and wort, and you arrive at them by taking a hydrometer reading and applying this formula:
GU = (SG - 1) x 1000
where SG is specific gravity. so yes, in effect, you just lop off the 1 and move the decimal point to the right three places. the reason is that water at 60 degrees is defined to have SG of 1.000, and hydrometers are calibrated to that. GU's represent the difference between wort and water in terms of measured density.
so 1.050 equals 50 GU's, 1.035 equals 35 GU's, etc.
now i'm going to give you an example similar to one in Ray's book.
how do you use gravity units to determine a grain bill?
1) determine the total amount of extract needed. take the final volume of beer multiplied by the gravity. say you want a beer with a final gravity of 1.051, that is 51 gravity units, and you want 5.5 gallons to pitch your yeast into. this will tell you how much extract you need from all the fermentables assuming you know your efficiency.
51 x 5.5 = 280.5 total GU
2) figure how much extract is needed from each fermentable source. say you decided you want to make a modern American pale ale with 80% of the fermentables from 2-row base malt, 12% from vienna base malt, 6% from crystal 20L, and 2% from carapils.
ingredient percent x total gravity = ingredient gravity
.80 x 280.5 = 224.4 GU 2-row base malt
.12 x 280.5 = 33.66 GU vienna base malt
.06 x 280.5 = 16.83 GU crystal 20L
.02 x 280.5 = 5.61 GU carapils
3) figure the number of pounds of each ingredient.
ingredient gravity / gravity per lb of malt = lbs needed
the gravity per lb of malt is determined by your mash efficiency and the maximum potential extract. the maximum is determined by labs, and you just look up the value if you can find it. your lhbs probably knows what that number is for each grain. if you don't know your efficiency, you have to assume something for starters and then measure afterwards to see how you did. then you can adjust the recipe next time to account for your mash efficiency.
let's say we looked up the extract potential of each grain and found this:
2-row base malt is 1.036
vienna malt is 1.034
crystal 20L is 1.034
carapils is 1.033
if your mash efficiency is 70%, then the gravity per pound of malt you will really get out of each grain is 70% of the extract potential. it's the extract potential (converted to GU's) times your efficiency. if 2-row is 1.036, then that is 36 GU, and 70% is what you will see, which is 25.2 GU per pound of 2-row per gallon of water. you can just calculate this in the previous formula:
ingredient gravity / (extract potential x your efficiency) = lbs needed
using GUs:
224.4 / (36 x .70) = 8.9 lbs of 2-row malt
33.66 / (34 x .70) = 1.4 lbs of vienna malt
16.83 / (34 x .70) = 0.7 lbs of crystal 20L
5.61 / (33 x .70) = 0.24 lbs of carapils
---
that's it. that's how you calculate your grain bill based on the percent composition of malts you are after and your last known efficiency. that's why it's important to measure SG and volume after mash and in the fermenter every time you brew and always figure out your current efficiency so you can brew the same beer at 80% eff that you brewed when you were getting 70% eff.
it should be clear now how you calculate your mash and brewhouse efficiency.
how do you calculate efficiency?
efficiency = total gravity of the wort / total potential gravity of the grains
let's say you brewed that grain bill example above, which you based on an assumed 70% efficiency in order to try to hit your 5.5 gallon at 1.051 SG target.
the potential extract (assuming 100%) of that amount of grains (what you actually mashed) is:
36 x 8.9 = 320.4 GU for 2-row malt
34 x 1.4 = 47.6 GU for vienna malt
34 x 0.7 = 23.8 GU for crystal 20L
33 x 0.24 = 7.92 GU for carapils
total is 399.72 GU
from your mash you collected 7 gallons of runnings at 1.043 SG.
7 x 43 = 301 total gravity of the wort
301 / 399.72 = .753 that is 75.3% mash efficiency
your final post-boil volume was 5.5 gallons at 1.052
5.5 * 52 = 286 total gravity of post-boil wort for pitching
286 / 399.72 = .715 that is 71.5% brewhouse efficiency
you done good!
now since you don't really lose sugars in the boil, you just lose volume with an increase in SG, why was your total gravity at pitching less than your total gravity after the mash? it's due to losses in the kettle, what you didn't get into the carboy. maybe dregs full of cold break at the bottom of the kettle and wort absorbed by hops that you decided to leave behind. your brewhouse efficiency will never be better than your mash efficiency unless you add fermentables like DME or LME to compensate for a mash that was less efficient than you were shooting for.
i hope that helps to demystify this subject. i don't use a brewing calculator, and i don't think you really need one. i just use a regular hand calculator and a piece of paper and a pencil to adjust my grain bills and to figure my efficiency for next time. it's easy once you do it a time or two.