It is well known that reflectivity of s and p polarized light is a function of refractive indices of pair of media involved. This concept is used here to determine the variation of refractive index of a graded index and step index optical fiber preform. The salient feature of the technique is that, unlike interferometric measurements, refractive index can be determined without measuring the thickness of the sample. Two frames are captured here to extract values of reflectivity for s and p polarized light using a basic in-line setup. Also the results from the proposed set up are compared with the results obtained from phase shifting interferometric technique using a Mach Zehnder interferometer. © 2020, Springer Nature Singapore Pte Ltd.