First, you add up the potential points/pound/gallon of your fermentables. This requires a chart. Then you divide the total points by the volume of wort. That is compared to the measured gravity.
A very simple example:
10 lbs 2-row pale @ 38 PPG
5 gallons of wort
That's 380 point/5 gallons = 76 points and a gravity of 1.076
If your measured gravity is 1.053, then your efficiency is 53/76 or 70%
Every grain has a different PPG and most brews use 3-5 grains.
See why we use software?
Remember one unassailable statistic, as explained by the late, great George Carlin: "Just think of how stupid the average person is, and then realize half of them are even stupider!"
"I would like to die on Mars, just not on impact." Elon Musk