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...
You need to validate the value of `brutto` element is a number before performing operation. the `+` operator is use to convert input to a number. 

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

```

This will also be useful since the element is readonly.
[Updated Fiddle](https://jsfiddle.net/satpalsingh/ze5tsgy9/5/)