In case of spectre you can do in this way.
Now this is in unity gain configuration and so you can run a transient with a large signal and then select THD option from the waveform viwer.There you need to specify the fundamental frequency.It will give you hormonic distortion interms of percentage.