The component of torque of a force F acting at a point r is equal to the vector product of the vector r and the force.
M_{x}=y F_{z} -z F_{y},
M_{y}=z F_{x} -x F_{z},
M_{z}=x F_{y} -y F_{x}.
You can also decide the sign from the direction of rotation the force would cause along an axis. Seeing from the positive x, y, or z axis, the moment is positive if it rotates anti-clockwise, and negative, if the rotation is clockwise.