JSFiddle - React, Tailwind, and code Playground
HTML
<label><input type=number id=str min=0 value=2000> Stroom (kWh)</label>
<label><input type=number id=gas min=0 value=1700> Gas (m³)</label>
<label>Verschil: <output id=verschil></output></label>
CSS
label {display: block}
JavaScript
function calc() {
verschil.value = (str.value * 0.00539 + gas.value * 0.06249).toFixed(2);
}
str.oninput = gas.oninput = calc;
calc();