The electron, hole, and exciton g factors and diamagnetic coefficients have been calculated using envelope-function theory for cylindrical InAs/InP quantum dots in the presence of a magnetic field parallel to the dot symmetry axis. A clear connection is established between the electron g factor and the amplitude of those valence-state envelope functions that possess nonzero orbital momentum associated with the envelope function. The dependence of the exciton diamagnetic coefficients on the quantum dot height is found to correlate with the energy dependence of the effective mass. Calculated exciton g factor and diamagnetic coefficients, constructed from the values associated with the electron and hole constituents of the exciton, match experimental data well, however including the Coulomb interaction between the electron and hole states improves the agreement. Remote-band contributions to the valence-band electronic structure, included perturbatively, reduce the agreement between theory and experiment.