Firstly website will start downloading known sized file. Then it will calculate the time taken for downloading the file. Then it will divide the file size by the time (time taken for download). After that same file will start uploading to server. Then it will calculate the time taken for uploading. After completion of uploading. It will divide the file size by uploading time. You will get downloading and uploading speed of your internet connection (broadband, 2g, 3g, 4g , dsl ).