The males have large, visible testicles right under their tail from a very young age. When they get scared they can retract them inside their body, but they never do this for very long. If you cannot easily tell the difference, then a good breeder should be able to sex them within seconds for you. If they can’t, they have no business selling rats.
Female rats, or does, are thinner than their male counterparts, a lot more active and a little smaller. Their coat is also smoother, they have very little smell about them and don’t mark their territory with urine nearly as much as the bucks. Roughly every 5 days the does will be in heat for a while. She will start to be very much on edge and her behavior will reflect this. She will become a bit jumpy and might do a mating dance where she will arch her back and wiggle her ears back and forth.
On the whole bucks are a lot more calm than does. Their coat is thicker and it has a somewhat musky smell to it. They are also very sweet and lovable but they are a lot more likely to be lazy, preferring to crawl up in your lap than run around and go crazy.
Some bucks like to mark almost everything with their urine, including their owner. This however should not be too much of a problem since it’s really just a few tiny drops of pee and it doesn’t even smell. If you do buy a male rat, be mentally prepared that you may have to neuter yours if it becomes too aggressive. If you buy a female, be aware that she might develop tumors around the breast area and you may have to get them removed. There are risks like this with any pet so you need to be aware of them and prepared in case they do occur.