After Joseph had been prison a while, Pharaoh became angry with his chief butler and chief baker. They were incarcerated where Joseph was, and he served them. They were in custody for a while. At this point in the text, Joseph is 28 years old (cf. 41:1,46). One night both the butler and baker had unique dreams. Evidently they were so vivid or distinct they knew there was some significance to them. When Joseph saw them the next morning, he could see their sadness and inquired about it. "And they said to him, 'We each have had a dream, and there is no interpreter of it.' So Joseph said to them, 'Do not interpretations belong to God? Tell them to me, please'" (Gen. 40:8). Joseph desires to help them, and they are willing to share their dreams with him. Joseph knew what many do not understand today: Revelations of the future do not belong to astrology, horoscopes, palm readers, etc.; they belong to Almighty God!
"Then the chief butler told his dream to Joseph, and said to him, 'Behold, in my dream a vine was before me, and in the vine were three branches; it was as though it budded, its blossoms shot forth, and its clusters brought forth ripe grapes. Then Pharaoh's cup was in my hand; and I took the grapes and pressed them into Pharaoh's cup, and placed the cup in Pharaoh's hand.' And Joseph said to him, 'This is the interpretation of it: The three branches are three days. Now within three days Pharaoh will lift up your head and restore you to your place, and you will put Pharaoh's cup in his hand according to the former manner, when you were his butler. But remember me when it is well with you, and please show kindness to me; make mention of me to Pharaoh, and get me out of this house. For indeed I was stolen away from the land of the Hebrews; and also I have done nothing here that they should put me into the dungeon'" (Gen. 40:9-15).
This is the first glimpse we see of the great gift God had given Joseph--the ability to interpret dreams! Joseph's interpretation is quite specific. God had revealed a portion of the future, and Joseph explained it plainly to the butler. In three days, the butler would know whether Joseph's interpretation was correct or not.
"When the chief baker saw that the interpretation was good, he said to Joseph, 'I also was in my dream, and there were three white baskets on my head. In the uppermost basket were all kinds of baked goods for Pharaoh, and the birds ate them out of the basket on my head.' So Joseph answered and said, 'This is the interpretation of it: The three baskets are three days. Within three days Pharaoh will lift off your head from you and hang you on a tree; and the birds will eat your flesh from you'" (Gen. 40:16-19).
The baker was encouraged by the favorable interpretation Joseph had given the butler, but after hearing this interpretation for himself he may have preferred not to have known! I wonder if he was skeptical of Joseph's interpretation now since it was not favorable or if he believed it and dreaded his rapidly approaching execution.
"Now it came to pass on the third day, which was Pharaoh's birthday, that he made a feast for all his servants; and he lifted up the head of the chief butler and of the chief baker among his servants. Then he restored the chief butler to his butlership again, and he placed the cup in Pharaoh's hand. But he hanged the chief baker, as Joseph had interpreted to them. Yet the chief butler did not remember Joseph, but forgot him" (Gen. 40:20-23).
Every detail Joseph had predicted came to pass. Now that is the mark of a true prophet of God! Obviously, both the dreams and interpretations had their source in God. Joseph had pleaded with the butler not to forget him, but the butler did precisely that, though not intentionally. He didn't show true appreciation for the comfort Joseph had given him. He selfishly received comfort from Joseph but did not return the favor when he had the opportunity--at least not until two years later when his memory was jogged, as Chapter 41 details.