"Late Show" host Dave Letterman asked Hanks Monday night about his weight, commenting that the "Captain Phillips" star looked slimmer than usual.
The 57-year-old admitted that he has been dealing with high blood sugar since he was 36 years old, around the time he made "Forrest Gump." He said his doctor told him during a recent visit that he has Type 2 diabetes, and he has since shed some pounds.
Hanks said his doctor told him if he can get his weight down to what it was in high school, he could reverse the condition. Hanks joked that he'll never be able to get down to 96 pounds.
Hanks has gained and lost weight for his many movie roles, appearing heavier in "Captain Phillips" than in "Cast Away" and "Philadelphia."
Letterman, who underwent heart bypass surgery in 2000, admitted that he also suffers from high blood sugar and had to go on a special diet.
Type 2 diabetes is the most common form of the disease and makes up about 90 percent of diabetes cases. It is usually managed by improving diet and increasing exercise. If that doesn't lower the blood sugar glucose level, then insulin may be necessary.
Type 1 diabetes is the less prevalent form of the disease, in which there is a total insulin deficiency and can be fatal if not controlled with supplemental insulin.
Other celebrities with diabetes include Halle Berry, Randy Jackson and Drew Carey.
ABC News contributed to this report.