We develop a three-point formula based on cubic spline in compression, for a class of singular two-point boundary value problems. For different values of parameters we obtain the classes of methods. These methods are illustrated by three numerical examples, two linear and one non-linear.