Online Unit Calculator

A unit calculator written in Java that can understand units, define new units, evaluate expressions with units, and simplify them by normalization. Please notice that owing to the parser built for this program, this calculator is right-associative. Deployed on the server side via Servlet, it uses PostgreSQL for storing user-defined units. Cookies are utilized for storing user's history on the client side.

Here are the instructions for this calculator. Type in expressions with units, e.g., 2m + 3m will result 5m. You can also define new units, e.g., def lightspeed 300000km/s. For multiple units, normalization is performed automatically, as 6m / 3m will result in 2m. Implicit normalization is supported by type in #, e.g., # lightspeed will return 300000000.0 meter second^-1. As Java is case-sensitive, notice that 5M is not the same quantity as 5m. Good luck and enjoy! View source HERE.

Enter your input:

Go back to Zhiwei Jia's home page