The films of titanium nitride were deposited by direct current magnetron sputtering on the surface of singlecrystalline silicon samples in an Ar-N2 atmosphere for use as a diffusion barrier. The thickness and density of films were measured by X-ray reflectometry. The design of the MAGNA TM-200-01 installation has been changed to increase the supply of nitrogen into the chamber. The influences of sputtering conditions, including the flow rate of nitrogen and argon gases and their N2 /Ar ratios in the range of 1–60 in the chamber, magnetron power of 690–1400 W on the formation of TiNx films, their density and stoichiometric composition, were studied. It is shown that the value of x is affected not only by the N2 /Ar gas flow rate ratio, but also by the magnetron power. At the sputtering parameters 1200 W, N2 /Ar = 30, 0.8 Pa, 320 s and 100°C, a maximum density of 5.247 g/cm3 of a film was achieved, which corresponds to the composition TiN0.786 = Ti56N44. The presence of nanocrystalline film of titanium nitride and the absence of a nanocrystalline titanium phase were confirmed by photographic X-ray diffraction. It was found that for the synthesis of titanium nitride as close as possible to the stoichiometric composition TiN0.770 - TiN0.786, it is necessary to use magnetron power in the range of 900–1200 W, nitrogen rate of 30 cm3 /min with low argon flows of 1–5 cm3 /min.