Just to clarify, are you actually talking about gussets or boxed corners?
A gusset is an inset piece of fabric, often used in garment construction, but could possibly be used in a bag. Most bags have boxed corners. If it's boxed corners, you can google 'boxed corner bag formula'. there are many hits, here's one:
https://baileymarieandme.wordpress.c...-measurements/