Ginger Software and Grammarbook.com gave the following rules that will help us learn how to use “compare to” and “compare with”
A. Compare To- When we compare something to something else, we are placing two things—sometimes very different things—in the same category and commenting on connections we perceive. We are expressing an opinion or making an observation. Others might not have noticed these similarities; still others might disagree with them
Ex. I’d compare the view from your living room to a painting by Bierstadt.
B. Compare With- When we compare something with something else, we are not expressing opinions or making personal statements. We are placing two things side by side and noting empirical similarities and differences. Our purpose is to be fair and impartial.
Ex. No other English painter can compare with Sutherland in the subtlety of his vision.