A typical chocolate bar contains about 10 milligrams of caffeine, which is less than a cup of coffee but enough to provide a mild energy boost.