A material-independent method for determining liquid-crystal (LC) anchoring energy on rubbed polyimide (PI) surfaces has been devised. This method exploits the changes in the easy axis of rubbed PI film induced by exposure to linearly polarized UV (LPUV) light. The distribution of PI chains in a rubbed film is approximated by a Gaussian function and its width determined from the measured rotation of the LC easy axis as a function of exposure time. A quasimicroscopic free energy of the LC-substrate interface is used to model LC anchoring properties. The experimental and calculated values of the azimuthal anchoring energy are in good agreement and found to depend inversely on the width of the distribution function. The measurements of the width of the chain distribution function provide a simple LC material-independent method for determining the LC anchoring properties. With this method, it is also possible to calculate the strength of the interaction between PI chains and LC molecules.