An eight-band k·p theory that does not suffer from the spurious solution problem is demonstrated. It is applied to studying the electronic properties of InP and InAs free-standing nanowires. Band gaps and effective masses are reported as a function of size, shape, and orientation of the nanowires. We compare our results with experimental work and with other calculations.