The standard formula for conversion is:
min(Converting Units * 6%, Casualties * 1.75) * Land Ratio
With Parasitic Hunger cast, the formula is changed to:
min(Converting Units * 9%, Casualties * 1.75) * 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.