Wiktionary
by a whisker
adv. By a very small distance
Usage examples of "by a whisker".
Either that was a nonhuman ship, or she was Emissary, which I imagine you'll agree is more likely by a whisker or three.
They also said I'd lose by a whisker, and we cut both those whiskers off, so don't worry about straw polls, Fletcher, they're for straw men.
Britney said, bracing herself as Mike slid through a three-lane sweep between four cars, missing them all by a whisker.
Harvey took a quick step backward, however, avoiding the fingers by a whisker.
On the second lap of the Abbey grounds, the runners came by, Tess Churchmouse in front by a whisker and a tail.