What part of the damage formula, specifically? Most of it is pretty straightforward. Effects typically stack multiplicatively - EG, if you have a mastery that gives an 8% damage bonus and another one that gives a 10% bonus, the combined total will be an 18.8% damage bonus.
The part that can at times be difficult to grasp is the damage reduction part. Here's a chart that explains how that one works: https://drive.google.com/file/d/1Utf-SJx2r0CNf_S8ixunhzLBBwuoanAT/view
There used to be a damage calculator sheet someone had shared on Google Drive, but it appears that it was taken down. I've uploaded a temporary copy of it here, though I don't actually have Excel installed on this laptop to validate that it works properly:
https://easyupload.io/wqv3ay
No idea if the link will work properly, or how long it will work for. I just googled "free file hosting" and chose one that seemed semi-legit.