In the present paper, the excitonic transitions are studied in an InAs/GaAs quantum wire with the consideration of geometrical confinement and the applied magnetic field strength. The binding energy of the exciton is found and thereby the interband optical transition energy is investigated using variational formulism within a single band effective mass approximation. The ground state energy of the exciton in the InAs/GaAs quantum wire in the influence of external magnetic field is found by minimizing the expectation value of the taken Hamiltonian with respect to the variational parameters in the trail wave function. The results show that the application of magnetic field and the influence of spatial confinement effect have considerable effects on the exciton binding energies and the optical transition energies and it brings out the quantum size effect. It is hoped that the present investigations would explore for the potential applications in single photon sources, photo-detectors and terahertz detectors.