Well, there are lot to estimate for this. First, the rpm. You will get this by the speed you want to get and the type of tire you will use. So if you use a tire with perimeter 1meter for example, the rpm of the shaft for 30Km/h will be

rpm = speed[km/h] x 1000 / 60 x perimeter [meters] = 30 x 1000 / 60 x 1 = 500rpm

From this number you can calculate the gear ratio for your motor. So if your motor rotates at 3000rpm max, you want a gear ratio of 3000/500 = 6:1

Now for the torque, you wanna know the force that you want to apply. Simply way to get it us by the load and the acceleration you want to achieve. The formula is a=f/m, so the force f is a x m [m/sec^2]

Now you wanna add some power for inclined situations where your seg wants to climb a hill... In this situation, there is a force pulling your seg backwards, this force can be calculated graphically with geometry. If W is the weight and a is the angle of the inclined surface, then cos(a)=Fi / W => Fi = cos(a) x W

Add some 15% overpower...

Then you can calculate the torque. The torque is calculated if you multiply the force in Newtons by the diameter of your wheel (If the perimeter is 1mt,. the diameter is 31.8cm or 0.318 mt). T = F x D [Nt-m]

Finally, the power of your motor is the rpm multiplied by the torque

W=T x rpm

And the electrical power is calculated by this formula

1HP = 736 Wattts

Make sure that you use all the appropriate units otherwise you may come up that you need a motor from a battleship to move your segway. Google for the above formulas to get the units you most prefer