do something off the top of one's head vs do something on the spur of the moment

do something off the top of one's head

do something on the spur of the moment

How often have the words do something off the top of one's head and do something on the spur of the moment occurred in a corpus of books? (source: Google Ngram Viewer )