Layers with gradient refractive-index profile are an attractive alternative to conventional homogeneous stack coatings. However, the optical characterization and monitoring of the graded refractive-index profile is a complex issue, which has been typically solved by using a simplified model of mixed materials. Although this approach provides a solution to the problem, the precision, which can be expected from optical characterization of the refractive index gradient, remains unclear. In this work, we study optical characterization of SiO_xN_y layers deposited via reactive dual ion beam sputtering. To characterize the deposited layers, we use several methods including reflectance, and transmittance spectra at a broad range of incident angles, together with spectral ellipsometry. All the data were simultaneously fitted with a general profile of refractive index. The expected profile used in our fit was based on characterization of SiO_xN_y layers with a varying stoichiometry. By altering of the profile, we discussed sensitivity of such alternation on fit quality and we studied ambiguity of merit-function minimization. We demonstrate that while the scanning of particular parameters of the profile can be seemingly very precise, we obtain a very good agreement between the experimental data and model for a broad range of gradient shapes, where the refractive-index value on major part of the profile can differ as much as 0.02 from the mean value.