I don't get it why is this not working properly:

[Fiddle](https://jsfiddle.net/ze5tsgy9/1/)

I just want to show the tax amount but it gets `false` results.

```
// calculate brutto and tax
$(document).on('keyup paste', '#netto', function() {
    var brutto = $("#brutto").val();
    var netto = $("#netto").val();
    $("#brutto").val(netto * 1.19);
    $("#tax").val(brutto - netto);
});

```
['https://Stackoverflow.com/questions/41160023', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2502731/']
Please try following code :

```
// calculate brutto and tax
$(document).on('keyup paste', '#netto', function () {

    var brutto = $("#brutto").val();
    var netto = $("#netto").val();

    $("#brutto").val(netto * 1.19);

    var brutto1 = $("#brutto").val();   

    $("#tax").val(brutto1 - netto);

```

});

In your code the value of brutto is not updated in variable after new value (natto \* 1.19), so you gets false result.

Thanks...
Parse you strings to int, change the event to a input type event:

```
 $(document).on('input', '#netto', function () {

  var brutto = parseInt($("#brutto").val());
  var netto = parseInt($("#netto").val());

  $("#brutto").val(netto * 1.19);
  $("#tax").val((netto * 1.19) - netto );

});

```

better if you go with a input type number so you don't have problems with invalid values

<https://jsfiddle.net/ze5tsgy9/6/>
or:

<https://jsfiddle.net/ze5tsgy9/7/> if you want to get rid of NaN when its empty