branch calculator