Remember to only input gems that increase your weapon's damage type. Eg. ATK Up for Hybrid Weapons, Physical ATK UP for Pure Physical Weapons, Same Element ATK UP for Elemental Weapons and so on. The Calculator assumes you will be stacking them, since that is optimal.
For discussions, comments, questions and more in-depth explanation of the underlying math, please visit this reddit thread.