A method for measuring the d-spacing on scale of nanometers of a crystalline sample with a standard small angle X-ray scattering (SAXS) setup by moving either the sample or detector, instead of directly measuring sample-to-detector distance is presented. The formulae of the d-spacing and its errors are derived. The error variation is analyzed in detail by simulation. The effectiveness of the method is further verified by the experiments on a standard sample. (C) 2016 Elsevier Ltd. All rights reserved.