<!Doctype html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> </head> <body> <label>Number of Shares:</label><input name="shares" id="shares" type="text" /> <br /> Total Value: € <span id="result"></span> <script> $(document).ready(function(){ $('#shares').keyup(function(){ $('#result').text($('#shares').val() * 1.5); }); }); </script> </body> </html>