---
title: "Unit Price Calculator"
method: GET
path: "/api/calc/unit-price-calculator"
tags: ["Everyday"]
---

# Unit Price Calculator

`GET /api/calc/unit-price-calculator`

## Request

- Base URL: `https://calcbright.com`
- URL: `https://calcbright.com/api/calc/unit-price-calculator`
- Auth: none declared

A 500 g pack at $3.99 costs $0.80 per 100 g, so a 1 kg pack at $7.20 ($0.72) is the better buy. Compare up to three sizes in mixed units to find the lowest price.

## Query parameters

- `currency` 'USD' | 'EUR' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'CHF' | 'CNY' | 'INR' | 'PKR' | 'AED' | 'SAR' | 'NZD' | 'SGD' | 'HKD' | 'SEK' | 'NOK' | 'DKK' | 'PLN' | 'TRY' | 'ZAR' | 'BRL' | 'MXN' | 'KRW' | 'THB' | 'MYR' | 'IDR' | 'PHP' | 'BDT' | 'EGP' | 'NGN' | 'KWD' | 'QAR' | 'BHD' | 'OMR' | 'RUB': Currency
- `p1` number: Product A price
- `q1` number: Size
- `u1` 'g' | 'kg' | 'oz' | 'lb' | 'ml' | 'l' | 'floz' | 'gal' | 'each': Unit
- `p2` number: Product B price
- `q2` number: Size
- `u2` 'g' | 'kg' | 'oz' | 'lb' | 'ml' | 'l' | 'floz' | 'gal' | 'each': Unit
- `p3` number: Product C price
- `q3` number: Size
- `u3` 'g' | 'kg' | 'oz' | 'lb' | 'ml' | 'l' | 'floz' | 'gal' | 'each': Unit

## Response `200`

Calculation result

- CalcOutput
  - `ok` boolean
  - `tool` string
  - `name` string
  - `url` string: Open this link to see the full calculation
  - `inputs` object
  - `summary` string: Plain-text answer
  - `details` string
  - `result` object
  - `errors` object

## Other responses

- `400`: Invalid input (see errors)

---

[API](https://skmtc.dev/calcbright/apis/calcbright-calculator-api.md) · [All operations](https://skmtc.dev/calcbright/apis/calcbright-calculator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calcbright/apis/calcbright-calculator-api/revisions/f58229e56e58?raw)
