Are fractional oxidation states possible?
The "oxidation number" is a theoretical value used to do electron bookkeeping and is one way of comparing the number of electrons "owned" by an atom in a molecule or ion versus how many valence electrons present in the atom as depicted on the periodic table.

Your calculation is assuming that all of the carbon atoms in octane have the same oxidation state, which is incorrect. The two terminal carbons have an oxidation state of -3 while the inner 6 have oxidation states of -2. Taking the average of these values gives you an average oxidation state, which in your case is a fractional number.

It is doubtful that the oxidation state calculated in this manner is of any use, since it is based on the assumption that all the carbons in the molecule are the same.