The synthesis of force-closure grasps on three-dimensional (3-D) objects is a fundamental issue in robotic grasping and dextrous manipulation. In this paper, a numerical force-closure test is developed based on the concept of Q distance. With some mild and realistic assumptions, the proposed test criterion is differentiable almost everywhere and its derivative can be calculated exactly. On this basis, we present an algorithm for planning force-closure grasps, which is implemented by applying descent search to the proposed numerical test in the grasp configuration space. The algorithm is generally applicable to planning optimal force-closure grasps on 3-D objects with curved surfaces and with arbitrary number of contact points. The effectiveness and efficiency of the algorithm are demonstrated by using simulation examples.