The Senate on Tuesday approved the measure by Democratic Sen. Anthony Portantino of La Canada Flintridge, sending it to the Assembly on a 23-10 vote.
The measure would also ban people from buying more than one rifle or shotgun each month. These limits currently only apply to handguns.
Republican Sen. Jim Nielsen of Gerber says California should instead target criminal gangs and those with mental disabilities whom he said will obtain the guns no matter the legal limits.
Walmart and Dick's Sporting Goods previously announced age limits on gun sales.
The topic has been frequently debated nationwide after a Florida high school shooting that killed 17 people.
The Associated Press contributed to this report.