In this paper, we present results of optical simulations on the absorption of nanowires. The simulation was performed with rigorous coupled wave analysis to determine the potential of nanowires for use in a new kind of nanostructured solar cell. The overall absorption of the solar cell structure was calculated for four different diameters of the nanowires and also in dependence of light wavelength and nanowire period. Absorption modes were observed at distinct wavelengths, but not dependent on the wire period. To derive a local optical generation function for a nanowire solar cell, the spatially resolved absorption profile was modelled for two wire periods. The calculated generation profiles can be readily used as input for an electrical simulation of a nanowire solar cell to calculate its quantum efficiency and the current–voltage characteristics. Copyright © 2011 John Wiley & Sons, Ltd.