This investigation presents axial ratio bandwidth enhancement for a quarter-wave polarizer composed of mutilayered uniaxial anisotropic media and chiral media using a genetic algorithm. In our design, the constitutive parameters of materials can be arbitrary. This broadband polarizer can be realized through the adjustment of the thickness of materials. The nearly optimal and suitable thickness of each cell is determined by using a genetic algorithm. Two numerical examples with three and five cells are presented to validate the design. The axial ratio bandwidths of about 84.1% and 92.8% can be achieved, more than the double of the maximum theoretical bandwidth for the case of the single uniaxial anisotropic slab.