(This is extracted from my free and ad-free Hamlet website, which I've been working on for over 20 years. For more, please google for "Smith's Hyper Hamlet, then see my introductory essay, "How to Love Hamlet." )

I Know a Hawk from a Handsaw - Hamlet and the Spanish Armada

HAMLET (2.2.387-388}

I am but mad north-north-west: when the wind is southerly I know a hawk from a handsaw.

BERNARDO [describing the previous appearance of the ghost of Hamlet's father] (1.1.44-47}

Last night of all,
When yond same star that's westward from the pole
Had made his course to illume that part of heaven
Where now it burns,

The "pole" is the North Star. "Westward from the pole" would be "north-northwest." Thus "I am but mad, north-northwest" means that Hamlet is only mad when under the influence of his father's ghost.

"Pole" might also be an allusion to Reginald Pole, who, as Bloody Mary's Catholic Archbishop of Canterbury, liked to call himself "the Pole Star" because he thought of himself as the guiding star about which the English people revolved.
Please see Shakespeare, Breakspear, and Broken Pole (The Prophesy) (Note: I mark my speculations with green italics. The rest is accepted historical fact.)

But Reginald Pole died of a broken heart when Queen Mary died and England reverted to Protestantism. Thirty years later, Queen Mary's widower, King Phillip of Spain sent the Duke of Medina Sidonia with the Spanish Armada to bring England back to the Catholic Church by "strong hands and terms compulsatory." But like Hamlet, Medina was but mad north-north-west: when the wind [was] southerly,) he was sane. On August 8, Saint Dominic's Day, Medina decided that if the wind continued to blow from the south (which it did) he would have to abandon the attack on England. He was unable to recapture the faith of Englishmen by force. He did "it wrong, being so majestical, to offer it the show of violence, for it is, as the air, invulnerable, and [his] vain blows malicious mockery." St Dominic had advocated reasoning with heretics to bring them back to the Church by persuasion rather than burning them. The significance of St Dominic's Day was not lost on English Catholics.

From the context, "I know the difference between a hawk and a handsaw" clearly means "I am in my right mind." However, I don't know why Shakespeare used that phrase to denote sanity. It might be related to the following line in Hamlet's instructions to the players:

HAMLET (3.2.4)

. . . Nor do not saw the air
too much with your hand, thus, but use all gently;
for in the very torrent, tempest, and, as I may say,
the whirlwind of passion, you must acquire and beget
a temperance that may give it smoothness.

In the tempest that had blown his Armada off course, Medina acquired and begat a temperance to abandon his vain blows against England. Perhaps "hand" is a pun on "Armada", similar to "Fort-in-bras" (near French for "strong arm").

It is worth noting that Shakespeare took pains to let us know that there had been a 30-year interval between the time old Fortinbras died and the time young Fortinbras came to reclaim those lands by strong hand and terms compulsatory. There was also a 30-year interval between the time Queen Mary died and the time her widower, Prince Phillip of Spain, sent the Spanish Armada to attempt to reclaim England by strong hand and terms compulsatory.

Elsewhere Hamlet alludes to another war to recover lost land, with his cryptic reference to old Jephtha.

HAMLET (2.2.418)

Am I not i' the right, old Jephthah?
. . .

HAMLET (2.2.426)

. . .
'It came to pass, as most like it was,

"As most like it was" sounds like "so like the king that was."

BERNARDO (1.1.121-124))

. . . . so like the king
that was and is the question of these wars.

That is Hamlet's dilemma - whether "to be or not to be," like the Ghost, "so like the king that was and is the question of these wars."

So like so many kings, his father, or old Jephtha.

The story of Jephtha, in Judges 11, sounds most like the story of the king that was and is the question of these wars. The Ammonites were preparing for war against Israel to recover land Israel had taken from them, just as young Fortinbras was preparing for war to recover of us, by strong hand and terms compulsatory, those foresaid lands so by his father lost in the fatal duel with old King Hamlet.

Judges 11.12

... What hast thou to do with me, that thou art come against me to fight in my land?

Judges 11.13

...Because Israel took away my land... now therefore restore those lands again

And you, the judges, bear a wary eye. (5.2.278)

Also please see
The Memory Be Green - Hamlet in Historical Context
The Madness of Hamlet
How to Love Hamlet