When Macbeth first encounters the witches on the heath, his reaction to their prophecies suggests that he has been thinking about ways and means of disposing of Duncan and his sons in order to become king. His reaction to being called Thane of Cawdor by Ross should be read as clues to his secret thoughts. He says, "The Thane of Cawdor lives." Here he is very serious. But he immediately suspects a trap, and he makes a joke of the next sentence: "Why do you dress me in borrowed robes?" He is afraid that his manner has betrayed his thoughts or that some people are suspicious of him, perhaps because he was overheard discussing his ambitions with his wife.
Then a bit later he says to himself in an aside:
Glamis and Thane of Cawdor!The greatest is behind.
He means that he has taken two steps toward his goal of becoming king and that the most difficult are already accomplished. Evidently he needs to have these titles in order to qualify to be elected king, or at least he needs some such distinguished titles to make him eligible. He has a lot of problems to solve before he can realize his ambition to become king.
The surest indication that he has not only been thinking about becoming king but actually considering the ways and means to achieve his goal come in his dialogue with his equally ambitious wife. When he tells her he has decided against killing Duncan, she bombards him with reproaches and insults. At one point she says:
What beast was 't then,That made you break this enterprise to me?When you durst do it, then you were a man;And to be more than what you were, you would Be so much more the man. Nor time nor placeDid then adhere, and yet you would make both.They have made themselves, and that their fitness nowDoes unmake you.
It is evident that they have discussed this "enterprise" of assassinating King Duncan in the past, before they were presented with such a golden opportunity to kill him as they have now that he has unexpectedly become their guest. She knows her husband was seriously considering doing the deed and had gone as far as trying to work out a detailed plot. The most significant lines are, "Nor time nor place / Did then adhere, and yet you would make both." (Perhaps they were even thinking about inviting Duncan to come and stay with them for a few days?) Macbeth had taken his wife completely into his confidence, and no doubt she had offered her own suggestions. They have been actively conspiring against King Duncan for some length of time, and they would have continued to conspire against him even if fate had not brought him under their battlements at this particular time, even if Macbeth had never encountered the witches, and even if he had not been appointed Thane of Cawdor.
It was essential...
for Macbeth and his wife to have thought about killing Duncan for some time. Otherwise their decision would seem much too hasty and reckless. Shakespeare would have had to create scenes in which, with Duncan already a guest and night approaching, they suddenly became ambitious and suddenly started talking about murdering the king. Not only has Macbeth been thinking about assassination and usurpation for a long while, but his wife has been thinking about it for a long while too. She has even thought about it more, since she has little else to do, while her husband is engaged in a life-or-death battle with the Norwegian invaders.