Photovoltaics based on nanowire arrays could reduce cost and materials consumption compared with planar devices but have exhibited low efficiency of light absorption and carrier collection. We fabricated a variety of millimeter-sized arrays of p-type/intrinsic/n-type (p-i-n) doped InP nanowires and found that the nanowire diameter and the length of the top n-segment were critical for cell performance. Efficiencies up to 13.8% (comparable to the record planar InP cell) were achieved by using resonant light trapping in 180-nanometer-diameter nanowires that only covered 12% of the surface. The share of sunlight converted into photocurrent (71%) was six times the limit in a simple ray optics description. Furthermore, the highest open-circuit voltage of 0.906 volt exceeds that of its planar counterpart, despite about 30 times higher surface-to-volume ratio of the nanowire cell.