13 years – Joseph was in prison for two years after he interpreted the dreams of the chief butler and baker (see Genesis 41:1). He was sold into slavery when he was about seventeen (see Genesis 37:2), and he was thirty years of age when he became vice-regent to the pharaoh (see Genesis 41:46).