Duration calculation according different parameters