You have miscalculated a battle when...

You chose to attack after the enemy archers were out of ammo so they couldn't defend themselves.

The enemy uses Elephants. Period.

Your "Charge the horse archers into the Swiss pikemen" plan became the "Charge the horse archers onto the Swiss pikes" plan.

You thought the tough guys in your retinue were going to help you.

You sallied forth after taking the castle.

Your Faction leader and Heir just died in the first charge.

It turned out longbows can pierce armor.

You were counting on God to smite your enemies.