Pegar porcentagem de um valor php

function porcentagem_nx ( $parcial, $total ) {
    return ( $parcial * 100 ) / $total;
}
Tiago F2