“planned.” The Hebrew word is chashab (#02803 חָשַׁב). The Theological Wordbook of the Old Testament by Harris, Archer, and Waltke, says: “The basic idea of the word is the employment of the mind in thinking activity. Reference is not so much to ‘understanding’ (cf. bi^n), but to the creating of new ideas. …Six clear variations of the basic thought of this root can be distinguished in the OT. The most frequently used is that of ‘planning,’ ‘devising.’ This variation is employed in reference to both man and God…. In one verse, Gen 50:20, there is reference to both man and God, as Joseph uses the word twice; first in saying that his brothers ‘meant’ (planned) evil in their earlier treatment of him, but that God ‘meant’ (planned) it for good.” The translation “planned” occurs in some other modern versions besides the REV (HCSB; GWN; NJB; Rotherham; Schocken Bible). Many versions use the word “intended,” such that the verse reads his brothers “intended” to do harm but God “intended it” for good; and others read “meant” and read “meant evil” and “God meant it for good.” To us those readings make it seem like God had a hand in the brothers’ evil planning, which He didn’t. God did not plan for Joseph’s brothers to do evil. They did that on their own by their own freewill, and then God planned around their evil plans.
What we see in Genesis 50:20 is people planning to do harm, and God working with the situation to bring good out of it. Although some people read into this verse that God plans for people to do evil so He can make good come from it, that is not what the verse says. It simply says that people planned evil, but God planned for good. God gives us freewill, and we have the ability to make good or bad choices. If we make bad choices, sometimes God can work with those choices and still bring about a good result. Thus, as people plan to do evil, God counter-plans ways to redeem the situation. Sadly, God has to respect some of the bad choices humans make, even though they end up being to their detriment. For example, if a person chooses not to be saved and have everlasting life, God has to honor that choice and allow them to die in the Lake of Fire (Rev. 20:11-15).
We can be sure that in biblical history many people were unjustly kidnapped and sold into slavery who then lived miserable lives and died lonely deaths. In Joseph’s case, God worked powerfully to position him to be able to save the nation of Israel. Man planned evil, but God planned for good, although man’s evil still meant people had to pay a price for that evil: Joseph was enslaved and imprisoned and separated from his family; Jacob was heartbroken for years; and Joseph’s brothers lived with the daily guilt of seeing their father and family suffer. Sin has a price, even when God can redeem the situation.