Create a custom calculator in wordpress

Assuming you only want to display the results, not save them to the server, creating a live calculator would require a little bit of Javascript code, and creating form fields for the input.

Note that by default, you cannot add Javascript to WordPress.com sites, or a self-hosted install with kses activated. You are not subject to those restrictions if you are logged in as an administrator.

Assuming you have appropriate permissions to include Javascript within a post, you could just paste something like this into the “Text” window of your post content:

X: <input id="valX" />
T: <input id="valT" />
<input type="button" value="Calculate" onclick="javascript:result.value=(5*parseInt(valX.value))+(4*parseInt(valT.value));" />
Result: <input id="result" /> 

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)