I think Beyoncé has a wider fan base. Sure Rihanna attracts a lot more younger people, but Beyoncé has fans/stans from 16 years ago so she's bound to sell more.
Though I speak only for ALBUMS, RiRi clearly dominates with singles.
- Success of previous era -> x4 #1 Platinum Albums (Debut at #1)
- Level of dedication with regards to their respective fanbases -> Got '4' to #1 when it leaked fully 3 weeks prior to release
- Social media presence - Do I really need to explain. She HAD a net worth of $300 million last year, that was without the success of 4 and her becoming a mother.