The preposition influences the meaning of the phrase.

  • If you're showing the similarities between two or more things, use "compare to." 

  • If you're showing both the similarities and differences between two or more things, use "compare with."