There are 2 other causes of line broadening in the XRD pattern:
Instrumental broadening. This is assessed by use of a highly crystalline material with sharp peaks. My earlier answer indicates one material (that I used) for this
Strain broadening
The Scherrer formula deals with neither of the above. Use of the Williamson-Hall method will allow the strain portion to be separated out.
The best way is to measure an instrumental broadening on a standard annealed stressless sample and then just take in into account in the Sherrer formula.
Ismat Ullah Many years ago I used a quartz sample of about 15 microns. You need to select a material whose peaks do not interfere significantly with yours. Williamson-Hall is preferred to Scherrer as there is also strain broadening to take account of.
There are 2 other causes of line broadening in the XRD pattern:
Instrumental broadening. This is assessed by use of a highly crystalline material with sharp peaks. My earlier answer indicates one material (that I used) for this
Strain broadening
The Scherrer formula deals with neither of the above. Use of the Williamson-Hall method will allow the strain portion to be separated out.