The verb compare comes from Latin comparare, “to pair together, couple, match, bring together.” It occurs in four common English idioms.
to compare someone or something to someone or something
to compare someone or something with someone or something
to compare notes on something or someone
to compare apples and oranges
compare with or to
Many speakers use “compare to” and “compare with” interchangeably; doing so is not an error. However, many writers observe a difference between the two. The Chicago Manual of Style does not state the difference as a rule, but does mention it in the section called “Good usage versus common usage:
To compare with is to discern both similarities and differences between things.
To compare to is to note primarily similarities between things.
For example, in the context of discussing the history of wartime nursing, one might compare Clara Barton to Florence Nightingale and be done with it; both women are noted for caring for wounded men on the battlefield.
Compare with would be reserved for a detailed comparison that notes differences between two people who are similar in some respects, but not in others.
“To compare notes” means “to compare observations.” For example, friends attending a conference might go to different sessions and later talk to each other about what they learned. Students reading the same novel might compare notes on their individual impressions.
compare apples to oranges
“To compare apples and oranges” is usually used in a context in which two things are so different from one another as to defy meaningful comparison. For example, the tiny country of Finland is often held up as a model for U.S. public education, but American educators protest in such statements as this: “Finland has free health care and preschool. We don’t. You’re comparing apples to oranges.”
Related post: Compared to or compared with?