The classical Whitney formula relates the number of times an oriented plane
curve cuts itself to its rotation number and the index of a base point. In this
paper we generalize Whitney's formula to curves on an oriented punctured
surface. To define analogs of the rotation number and the index of a base point
of a curve, we fix an arbitrary vector field on the surface. Similar formulas
are obtained for non-based curves.