The Hamiltonian–Krein (instability) index is concerned with determining the number of eigenvalues with positive real part for the Hamiltonian eigenvalue problem , where is skew-symmetric and is self-adjoint. If has a bounded inverse the index is well established, and it is given by the number of negative eigenvalues of the operator constrained to act on some finite-codimensional subspace. There is an important class of problems—namely, those of KdV-type—for which does not have a bounded inverse. In this paper, we overcome this difficulty and derive the index for eigenvalue problems of KdV-type. We use the index to discuss the spectral stability of homoclinic traveling waves for KdV-like problems and Benjamin—Bona—Mahony-type problems.