This is a good calculator script that takes user input and can perform 23 functions including Add, Subtract, Multiply, Divide, take the Sin, covert to Hex, square root, and more. It is easily customizable with a little knowledge of PHP and HTML.
This is a code snippet that converts measurements such as degrees Celsius and Fahrenheit; centimeters and inches; meters and feet; kilometers and miles; kilograms and pounds; milliliters to ounces; and for fun, regular beers and tall beers. This was created for the expatriate American. It distinguishes singular and plural in the first value (for example, it will say 1 ounce, 2 ounces, and so on). Reloads if no values are given. It ignores extra spaces in the input, so -1 and - 1 (see the space) are the same. There's also a 'quick & dirty' check to make sure the first value given is not a letter, returns with a warning.
This is a simple PHP calculation script that calculates and prints the results of hard-coded values. In this script, the output is formatted using sprintf.