Carbon-ion beams are increasingly used in the clinical practice for external radiotherapy treatments of deep-seated tumors. At therapeutic energies, carbon ions yield significant secondary products, including neutrons, which may be of concern for the radiation protection of the patient and personnel. We simulated the neutron yield produced by proton and carbon-ion pencil beams impinging on a clinical phantom at three different angles: 15�, 45� and 90�, with respect to the beam axis. We validated the simulated results using the measured response of organic scintillation detectors. We compared the results obtained with FLUKA 2011.2 and MCNPX 2.7.0 based on three different physics models: Bertini, Isabel, and CEM. Over the different ions, energies, and angles, the FLUKA simulation results agree better with the measured data, compared to the MCNPX results. Simulations of carbon ions at low angles exhibit both the highest deviation from measured data and inter-model discrepancy, which is probably due to the different treatment of the pre-equilibrium stage. The reported neutron yield results could help in the comparison of carbon-ion and proton treatments in terms of secondary neutron production for radiation protection applications.