It is not easy to know that since the Divine Will is hidden behind many layers and often muffled through many voices and noises within us. One has to be very calm and attentive, free from the restlessness of desires and preferences to know it.
A simpler and more practicable thing is to act according to the highest ideal, the best goal one can conceive of and offer it to the Divine and let Him then take over whatever we have chosen ignorantly or wisely.