What year, CPU speed is your iMac?
The maximum amount of RAM depends on the Mac model year and installed CPU.
To find out info about your system,
Click on the Apple symbol in the upper left of the OS X main menu bar. A drop down menu appears.
Click About this Mac. A smaller popup window appears. This gives you basic info like what version of OS X your iMac is running, the speed of your iMac's CPU and how much RAM is installed.
Click on the button that says More Info. A larger window appears giving you a complete overview of your iMac's hardware specs.
Highlight all of this info and copy/paste all of this into another reply to this post, editing out your iMac's serial number before actually posting the reply.