The formula for efficiency is:
efficiency = (useful energy / total energy)
Therefore, first we must find the total energy which is the sum of all of the branches of the Sankey diagram. So take the energy specified at each branch and add them to find a total.
The useful energy will be the energy specified by the branch which does not turn off to one side- it carries on straight forwards. For example, in a circuit with a light bulb, the useful energy will be the light energy.
Divide the useful energy by the total energy and you will get the efficiency which should be between 0 and 1. Multiply by 100 to find the percentage efficiency.