In this work, we study the energy levels of electrons and holes of InAs quantum dots inside InP/InAs \({}_{0.25}\) P \({}_{0.75}\) /InP semiconductor nanowires. Taking into account the nonparabolicity of the dispersion law, the energy levels are calculated in two different ways. The change in the energy levels of a quantum dot at different positions inside a quantum nanowire is considered. The energy levels of semiconductor nanowire of various sizes are studied at a constant size. Changes in the energy levels of a quantum nanodot of a cubic shape are found when its size changes from 5 to 25 nm, located inside a quantum nanowire with a square section of 25 \(\times\) 25 nm.