Before giving the formula, note that the response of the gyroscope wheel will not be in opposite direction.
For names of direction of rotation let me use the standard names of aircraft principle axes: roll, pitch and yaw.
Take the spin axis of the gyro wheel as rolling, and apply a large torque that will pitch the gyro wheel fast. Then in response the gyro wheel will yaw.
But then: if that yawing motion is fast too it will itself give rise to a response.
So: to construct a robot that can flip itself is not straightforward. I'm guessing it can be done, but be prepared to see first attempts move in a way that is counter-intuitive to you.
As to a formula:
The usual letter for rotation rate is the greek letter 'omega' $\omega$
I will use a subscript to distinguish between spin rate and pitch rate
The usual letter for torque is the greek letter 'tau' $\tau$
I will use an expression for a highly simplified configuration, a wheel with all of its mass located at the outer rim. Of course an actual wheel is a disk. Still: usually a gyro wheel has as large proportion of its mass close to the rim. You will need to guess the error that is introduced by this simplification so you can compensate for it.
spin rate: $\omega_s$
pitch rate: $\omega_p$
wheel mass: $M$
wheel radius: $R$
formula for the magnitude of the resulting torque when a spinning gyro wheel is pitched:
$$ \tau = \omega_s \omega_p M R^2 $$
Responding to a comment:
There is the dimensionality check:
dimensionality of torque: $Nm$
Hence: dimensionality of torque: $M L^2 T^{-2}$
(kilogram, meter, meter, per second, per second)
There is the consistency with the following approximate formula of rate of precession (L for angular momentum of the spinning gyro wheel):
$$ \omega_p = \frac{\tau}{L} $$
(The above formula is a good approximation only when the rate of precession is slow compared to the spin rate. When the rate of precession is fast then the angular momentum of the precession is a significant contribution.)
(My apologies for not giving the derivation I used. I concur that I really should. I integrated around the rim of the gyro wheel. That is an unusual derivation method, so if I were to give the derivation here I would have to explain many of the steps.)