Is it possible to call a custom module function in the theme template file? I created a custom module and there is a simple hello_world() function. Is it possible to call this function in the page template file? 

Module file looks like this.

function choco_custom_newui_total_students(){
return 500;
}

function choco_custom_newui_preprocess_page(&amp;$variables) {
    $variables['total_students'] = total_students();
}


page--front.tpl.php

&lt;h2&gt;&lt;? echo $total_students?&gt;&lt;/h2&gt;
You can do it, but it's not recommended, because in the Model-View-Controller pattern, your logic is in the Controller (in this case your module) and in the View (your .tpl file) you should only have code to show the values that comes from the Controller.
The idea is that all variables are prepared in template preprocess functions (in modules or in your template.php).
You can implement the hook_preprocess_page():
function YOUR_MODULE_preprocess_page(&amp;$variables) {
    $variables['my_var'] = hello_world();
}

and in your page.tpl.php file you can now use $my_var to output the value set in your preprocess function:
echo $my_var;