I am wondering if there is a "simple" formula to calculate the mode?
The assumption is that you are asking a question about the mode of statistics (mean, mode, median).
If you know the definition of mode then
you know there can be 1, or 2 or n modes is a set.
To answer your question: Simply count 'em.
Nothing I know could be more simple.
Since the mode(s) can be at BOTH ends of the data set (at the same time), ordering the set doesn't help much.
Of course it can be more difficult than that when you've got a variable that can range over a continuous domain, as then you have to split your domain into intervals, and count the number of points in each interval. Where you choose your interval boundaries affects the mode, evidently ...
If I were to program the discrete model, I would arrange the points into order, and assign a variable that records the maximum so far, and a list of variables containing the values that attain that maximum. Then go thru them all point by point and as soon as I reach a value with more points in it than the maximum, throw away the list and start it again with this value. If there's a value for which the number of points equals the maximum, add that value to the list of values that attain that maximum. The only time-consuming bit is the sort algorithm.