you can do it through the javascript
function sample(){
var v1=Xrm.Page.getAttribute('quantity').getValue();
var v2=Xrm.Page.getAttribute('fee').getValue();
var v3=v1*v2;
Xrm.Page.getAttribute('TotalAmount').setValue(v3); trigger function on change of the fee
ms crm