Internal resistance (r) of any real source is the resistance that charge moving through the material of the source encounters.
The presence of internal resistance in a source of electromotive force means that the potential difference across the terminals of the electrical source (terminal potential difference) is always less than its electromotive force.
By conservation of energy,
Energy delivered by emf source = Energy dissipitated by external resistor + Energy dissipitated by internal resistor
$P_{\epsilon} \, t = P’_{AB} \, t + P_{r} \, t$
$I \epsilon = I V_{AB} + I V_{r}$
$\epsilon = V_{AB} + V_{r}$
$\epsilon = IR + Ir$
$IR = \epsilon \: – Ir$
$V_{AB} = \epsilon \: – Ir$
Terminal potential difference across battery = $\epsilon$ – Ir
Efficiency = $\frac{P_{load}}{P_{emf}}$ = $\frac{I^{2}R}{I \epsilon}$ = $\frac{IR}{I (R + r)}$ = $\frac{R}{R +r}$