barely vs by a hair

barely

adv
  • By a small margin. 

  • Almost not at all. 

by a hair

How often have the words barely and by a hair occurred in a corpus of books? (source: Google Ngram Viewer )