According to TibiaWiki the formula is Magic Shield = (Level * 7.6) + (Magic Level * 7) + 300
Also, just a note that the magic level does include any current bonuses you have from equipment or drinking potions.
CIP updated this formula to help lower levels with a larger mana shield with the flat +300 base. This means the 300 mana bonus will make a much larger difference for lower levels. For example that 300 mana bonus will give a level 50 with magic level 50 approximately a 40% increase to their magic shield. Where if you were to take a level 200 with magic level 50 the 300 shield bonus is approximately 15%. The higher level a character the less impact that extra 300 mana will have.
Source: https://tibia.fandom.com/wiki/Magic_Shield