How long will you need a cast for a broken thumb?

Depends. Depends on the type of fracture and how fast you heal discuss with your doctor.
It depends. What part of the thumb is broken? A phalanx or metacarpal fracture in the hand will generally heal in about six weeks. Cast immobilization for about four weeks, though, is often sufficient, with gradual return to normal hand activities at six weeks or so. Much, though, depends on the bone that is fractured, as well as any other medical issues (smoking/diabetes) which can slow the healing process.