The standard formula for conversion is:
min(Converting Units * 6%, Defensive Casualties * 1.65) * Land Ratio
With Parasitic Hunger cast, the formula is changed to:
min(Converting Units * 9%, Defensive Casualties * 1.65) * Land Ratio
Land Ratio is
Defender Size / Attacker Size.
Since it is limited by the number of casualties suffered by the defender, attacking immortal units will not yield any conversions.