Hi Dhanuka,
This formula in your post is a well known method used by report developers and developed by Dave Rathburn.
Please refer to following post from Dave, he has explained it very well about what has been done in above formula:
http://www.dagira.com/2009/10/23/calculating-business-days-between-two-days-via-report-functions/2/