Walking on treadmill

I want to start losing weight and I want to walk on the treadmill. How long is a good time or distance to lose weight?