Genesis 37:17-36

17And the man said, “They have gone away, for I heard them say, ‘Let us go to aDothan.’” So Joseph went after his brothers and found them at bDothan.

18They saw him from afar, and before he came near to them cthey conspired against him to kill him. 19They said to one another, “Here comes this dreamer. 20Come now, dlet us kill him and throw him into one of the pits.
Or cisterns; also verses 22, 24
Then we will say that a fierce animal has devoured him, and we will see what will become of his dreams.”
21But when fReuben heard it, he rescued him out of their hands, saying, “Let us not take his life.” 22And Reuben said to them, “Shed no blood; throw him into this pit here in the wilderness, but do not lay a hand on him”— gthat he might rescue him out of their hand to restore him to his father. 23So when Joseph came to his brothers, they stripped him of his robe, hthe robe of many colors that he wore. 24And they took him and ithrew him into a pit. The pit was empty; there was no water in it.

25Then they sat down to eat. And looking up they saw a jcaravan of kIshmaelites coming from Gilead, with their camels bearing lgum, balm, and myrrh, on their way to carry it down to Egypt. 26Then Judah said to his brothers, “What profit is it mif we kill our brother and conceal his blood? 27Come, let us sell him to the Ishmaelites, and nlet not our hand be upon him, for he is our brother, our own flesh.” And his brothers listened to him. 28Then oMidianite traders passed by. And they drew Joseph up and lifted him out of the pit, and psold him to the Ishmaelites for twenty shekels
A  shekel was about 2/5 ounce or 11 grams
of silver. They took Joseph to Egypt.

29When Reuben returned to the pit and saw that Joseph was not in the pit, he rtore his clothes 30and returned to his brothers and said, “The boy sis gone, and I, where shall I go?” 31Then they took tJoseph’s robe and slaughtered a goat and dipped the robe in the blood. 32And they sent the robe of many colors and brought it to their father and said, “This we have found; please identify whether it is your son’s robe or not.” 33And he identified it and said, “It is my son’s robe. uA fierce animal has devoured him. Joseph is without doubt torn to pieces.” 34Then Jacob tore his garments and put sackcloth on his loins and mourned for his son many days. 35All his sons and all his daughters vrose up to comfort him, but he refused to be comforted and said, “No, wI shall go down to Sheol to my son, mourning.” Thus his father wept for him. 36Meanwhile xthe Midianites had sold him in Egypt to Potiphar, an officer of Pharaoh, ythe captain of the guard.

Copyright information for ESV