the static margin of longitudinal stability can be calculated from
static margin = (AC-CP) / c
AC is the position of the aerodynamic center, CP is the Center of pressure, and c typically is the mean aerodynamic chord.
All three are not so easy to calculate. You may want to use a free tool such as
Aeolus Aero Sketch Pad https://www.aeolus-aero.com/software/
which does the work for you.
Use a XFLR