They yield of acid amide in the reaction, RCOCl+NH3→RCONH2 , is maximum when
Acid chloride and ammonia are treated in 1 : 2 molar ratio
For the complete conversion of an acid chloride molecules into acid amide, ammonia should be used 1 : 2 molar raio : because one molecule of ammonia acts a nucleophile while the other as a Bronsted base to remove the acid formed during the reaction.
RCOCl+NH3→RCONH2+HClHCl+NH3→NH4ClRCOCl+2NH3→RCONH2+NH4Cl
In case the two reactants are taken in 1 : 1 molar ratio, one half of acid chloride will remain unreacted.
RCOCl+NH3→12RCONH2+12NH4Cl+12RCOCl
However, the above reaction can be forced to completion if it is carried out in presence of some other base, like NaOH, which reacts with the acid formed and thus allowing the whole NH3 a weaker base to react only with RCOCl.
RCOCl+NH3NaOH−−−−→RCONH2+NaCl+H2O