You need to estimate your opponent's range to calling all-in when you do the equity calc.
It's unwise to assume that they'll call your all-in with their entire pre-flop range (unless you have a read otherwise).