Data used from Arena 8, Numerics.info used for calculations
Rarity chances for one random card, chance numbers obtained fromClashRoyale Blog (do x100 for percentage):
common : 1/(1+1/10+1/10/20+1/10/20/20)
rare : (1/10)/(1+1/10+1/10/20+1/10/20/20)
epic : (1/10/20)/(1+1/10+1/10/20+1/10/20/20)
legendary : (1/10/20/20)/(1+1/10+1/10/20+1/10/20/20)
Average number of cards per chest, using info from ClashRoyale Wikia on cards per chest:
Silver
common : (1/(1+1/10+1/10/20+1/10/20/20))*11
rare : ((1/10)/(1+1/10+1/10/20+1/10/20/20))*11
epic : ((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*11
legendary : ((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*11
Gold
common : (1/(1+1/10+1/10/20+1/10/20/20))*(38-3)
rare : ((1/10)/(1+1/10+1/10/20+1/10/20/20))*(38-3)+3
epic : ((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(38-3)
legendary : ((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(38-3)
Giant
common : (1/(1+1/10+1/10/20+1/10/20/20))*(304-30)
rare : ((1/10)/(1+1/10+1/10/20+1/10/20/20))*(304-30)+30
epic : ((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(304-30)
legendary : ((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(304-30)
Magical
common : (1/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)
rare : ((1/10)/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)+22
epic : ((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)+3.8
legendary : ((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)
Super
common : (1/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)
rare : ((1/10)/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)+136
epic : ((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)+22.8
legendary : ((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)
Number of cards you get per 1000 gems for each store bought chest
Giant (490 gems)
common : ((1/(1+1/10+1/10/20+1/10/20/20))*(304-30))*1000/490
rare : (((1/10)/(1+1/10+1/10/20+1/10/20/20))*(304-30)+30)*1000/490
epic : (((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(304-30))*1000/490
legendary : (((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(304-30))*1000/490
Magical (800 gems)
common : ((1/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22))*1000/800
rare : (((1/10)/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)+22)*1000/800
epic : (((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)+3.8)*1000/800
legendary : (((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22))*1000/800
Super (4600 gems)
common : ((1/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136))*1000/4600
rare : (((1/10)/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)+136)*1000/4600
epic : (((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)+22.8)*1000/4600
legendary : (((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136))*1000/4600
The chest cycle info from ClashRoyaleArena.com
silver : 180
gold : 54
giant : 3
magic : 3
That's 240 chests in total. Although I didn't find any concrete source it is often mentioned Super Magical Chests has a droprate of 1 in 1000. According to some user reports these replace the chest you were about to get. Average chest cycle of:
silver : 180-180/1000
gold : 54-54/1000
giant : 3-3/1000
magic : 3-3/1000
super : 240/1000
Number of gems required to boost one full cycle
(180-180/1000)*18+(54-54/1000)*48+(3-3/1000)*72+(3-3/1000)*72+(240/1000)*144
Number of cards average per 1000 gems by boosting chests from cycle
Common : ((1/(1+1/10+1/10/20+1/10/20/20)*11*(180-180/1000) + (1/(1+1/10+1/10/20+1/10/20/20))*(38-3)*(54-54/1000) + (1/(1+1/10+1/10/20+1/10/20/20))*(304-30)*(3-3/1000) + (1/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)*(3-3/1000) + (1/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)*(240/1000)) * 1000/((180-180/1000)*18+(54-54/1000)*48+(3-3/1000)*72+(3-3/1000)*72+(240/1000)*144)
rare: (((1/10)/(1+1/10+1/10/20+1/10/20/20))*11*(180-180/1000) + (((1/10)/(1+1/10+1/10/20+1/10/20/20))*(38-3)+3)*(54-54/1000) + (((1/10)/(1+1/10+1/10/20+1/10/20/20))*(304-30)+30)*(3-3/1000) + (((1/10)/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)+22)*(3-3/1000) + (((1/10)/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)+136)*(240/1000)) * 1000/((180-180/1000)*18+(54-54/1000)*48+(3-3/1000)*72+(3-3/1000)*72+(240/1000)*144)
epic : (((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*11*(180-180/1000) + ((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(38-3)*(54-54/1000) + ((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(304-30)*(3-3/1000) + (((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)+3.8)*(3-3/1000) + (((1/10/20)/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)+22.8)*(240/1000)) * 1000/((180-180/1000)*18+(54-54/1000)*48+(3-3/1000)*72+(3-3/1000)*72+(240/1000)*144)
legendary : (((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*11*(180-180/1000) + ((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(38-3)*(54-54/1000) + ((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(304-30)*(3-3/1000) + ((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(114-3.8-22)*(3-3/1000) + ((1/10/20/20)/(1+1/10+1/10/20+1/10/20/20))*(684-22.8-136)*(240/1000)) * 1000/((180-180/1000)*18+(54-54/1000)*48+(3-3/1000)*72+(3-3/1000)*72+(240/1000)*144)