Depends on which 'previous' iMac you are talking about. The manual/guide that came in the box will tell you. Lowend mac should have you model listed with the maximum RAM listed.
Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.