JSFiddle - React, Tailwind, and code Playground
HTML
absolut value:<input type="text" id="absolut" value="0"/>
percentage of 5:<input type="text" id="percentage" value="0"/>
JavaScript
$("#absolut").change(function(){
$('#percentage').val(parseFloat($(this).val())*100/5);
});
$("#percentage").change(function(){
$('#absolut').val(parseFloat($(this).val())*5/100);
});