One way of looking at it is through the lens of honor. Both Macbeth and Hamlet fight and ultimately are killed, but only one is honorable-- Hamlet. While Macbeth kills many people in pursuit of becoming King, Hamlet delays killing his Uncle because of philosophical concerns and doubts about what is the right thing to do and how to do it. Hamlet finally is able to avenge his father's death, but dies honorably in the process. In contrast, Macbeth also dies, and although he does die in battle on the battlefield it can not be called an honorable death as he has caused the deaths of so many other people purely for his own potential benefit.
One thing they have in common is that their journeys, both of which end in blood and death, start with something mystical-- Hamlet with the ghost of his father, and Macbeth with the witches.
There are so many ways to contrast the characters! Both Hamlet and Macbeth have characters who appear to have a mental breakdown. However, Hamlet is acting the part to deceive Claudius, while Macbeth has truly gone mad in his lust for power.
Macbeth and Hamlet are different in many of their characteristics as people. Macbeth is very war orriented and wants to rule everything that he touches while Hamlet is very calm, artistic and sensitive (you can see this