If the reaction is carried out under standard conditions (unit concentrations and pressures) and at a temperature that corresponds to a table of thermodynamic values (usually 298.15 K), then you can subtract the standard Gibbs Free Energy of Formation (#DeltaG_f#) of the reactants from those of the products.
Otherwise, you will need to take a more complicated approach:

Calculate the standard enthalpy of reaction by subtracting #DeltaH_f# of the reactants from the products.

Follow a similar procedure to calculate the standard entropy of reaction (#DeltaS#).

Calculate #DeltaG^0# for the reaction using the equation #DeltaG^0=DeltaH^0TDeltaS^0#. This makes the approximation that #DeltaH^0# and #DeltaS^0# are independent of temperature. The superscript 0 indicates "under standard conditions".
The #DeltaG^0# that you calculated in step 3 is the standard change in Gibbs Free Energy, assuming that all reactants and products are present in unit concentrations (1 M for solutes or 1 bar partial pressure for gases or pure liquids or pure solids). If you want to calculate #DeltaG# under nonstandard conditions, you need to use the equation
#DeltaG = DeltaG^0 + RTlnQ# where Q is the ratio of concentrations (or activities) of the products divided by the reactants. Under standard conditions Q=1 and #DeltaG=DeltaG^0#. Under equilibrium conditions, Q=K and #DeltaG=0# so #DeltaG^0=RTlnK#.
For higher accuracy, you can account for the temperature dependence of #DeltaH^0# and #DeltaS^0# by considering the #DeltaT# between the actual temperature of reaction in the standard temperature of the thermodynamic table you're using. For example, if your reaction is at 350K and your table is for 298K then for each reactant and product the enthalpy and entropy of formation is:
#Delta_fH_350# = #Delta_fH_298 + C_P(350298)#
#S_350# = #S_298 + C_P ln(350/298)#
Then calculate the #DeltaH# and #DeltaS# for the reaction and the rest of the procedure is unchanged.