We define mean index for non-periodic orbits in Hamiltonian systems and study its properties. In general, the mean index is an interval in R which is uniformly continuous on the systems. We show that the index interval is a point for a quasi-periodic orbit. The mean index can be considered as a generalization of rotation number which defined by Johnson and Moser in the study of almost periodic Schrodinger operators. Motivated by their works, we study the relation of Fredholm property of the linear operator and the mean index.