DarpanX is a Python 3 package that provides functionality to compute reflectivity and other specular optical functions of a multilayer or single layer mirror for different energy and angles as well as to fit the XRR measurements of the mirrors.