You can call like this, I have called calculate(); function from success method of a BindData(); function
<script>
function BindData() {
$.ajax({
type: "POST",
url: "pageName.aspx/webMethodName",
data: "{}",
contentType: "application/json",
dataType: "json",
success: function (data) {
calculate();
}
})
}
function calculate(){
}
</script>