'Compare to' is used to show how 2 different things are similar, while, 'compare with' is used to compare similarities between 2 similar things
In short,
If 2 things are similar, use 'with'. Eg: Ram compared his shirt with that of Sham. Here, you will use 'with' as you are comparing 2 similar things,ie, shirts.
If 2 things are not similar, use 'to'.
In short,
If 2 things are similar, use 'with'. Eg: Ram compared his shirt with that of Sham. Here, you will use 'with' as you are comparing 2 similar things,ie, shirts.
If 2 things are not similar, use 'to'.






