The optimisation of the foam used for shock absorption in bicycle and motorcycle helmets is considered. It is shown that for the former the ideal foam yield stress for impact with a rigid protruding object is higher than that for impact with a deformable flat object. Therefore the design must be a compromise. For motorcycle helmets the shell stiffness is higher and the force to cause shell buckling plays a significant part in the response. Lower density foams can only be used if the impact test standards are re-written with less emphasis on impacts with convex and pointed objects.