Skip to content

dohliam/compare-prices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compare prices - Shopping helper

Let's say you are looking at two different products in a store. The first one is $5.89 for 350 ml, and the second one is $7.50 for 16 fl oz. Quick, which one is the better deal? "Compare prices" can help you quickly and easily resolve this problem.

Usage

Enter the cost of the items in the price field. This will work for any currency counted in units of 100 (dollars, euros, rubles, etc).

Enter the dry or liquid weight of the items in the per field, and select the type of units from the dropdown menu below.

Press the Convert button to calculate the result. The prices will be standardized to the cost per 100 g if dry weight, or 100 ml if fluid weight.

Units supported

Metric:

  • grams (g)
  • kilograms (kg)
  • millilitres (ml)
  • litres (l)

Imperial:

  • pounds (lb)
  • ounces (oz)
  • fluid ounces (fl oz)

To implement

  • Option to change currency symbol

See also

"Compare prices" is part of the tiny tools series, a collection of small mobile-friendly JavaScript tools for performing common tasks in the browser.

Other tools for working with numbers, units, and currencies that might also be of interest:

Credits

License

MIT.