The invention relates to a process for preparing a liquid pharmaceutical formulation containing a complex of macrocyclic chelate with a lanthanide and a mol/mol amount of free macrocyclic chelate of between 0.002% and 0.4%, said macrocyclic chelate being DOTA and said lanthanide being gadolinium, said process comprising the following successive steps:b) preparing a liquid pharmaceutical composition containing:- the complex of macrocyclic chelate with a lanthanide,- free macrocyclic chelate that is not under the form of an excipient X[X,L] in which L is the macrocyclic chelate and X and X are a metal ion, in particular chosen independently from calcium, sodium, zinc and magnesium, and/or- free lanthanide,wherein the amounts of free macrocyclic chelate and of free lanthanide added are such that there is an excess free macrocyclic chelate or an excess free lanthanide,c) measuring, in the pharmaceutical formulation obtained in step b), the concentration of free macrocyclic chelate Cch l and/or free lanthanide Clan ld) adjusting Cch l and of Clan l so as to obtain Clan l = 0 and to obtain Cch l = Ct ch l, wherein Ct ch l is the target concentration of the free macrocyclic chelate in the final liquid pharmaceutical formulation and is selected in the range of between 0.002 % and 0.4 % mol/mol, said adjustment of Cch l and of Clan l being performed- if Clan l > 0 and/or Cch l < Ct ch l, by adding free macrocyclic chelate and/or by eliminating free lanthanide by passing through an ion-exchange resin and/or by modifying the pH,- if Clan l = 0 and Cch l > Ct ch l, by eliminating free macrocyclic chelate and/or by adding free lanthanide and/or by modifying the pH,wherein the amount of free macrocyclic chelate in the final liquid pharmaceutical formulation corresponds to the proportion of free macrocyclic chelate relative to the amount of complexed macrocyclic chelate DOTA-Gd in the final liquid pharmaceutical formulation in mol/mol.