Margin and Markup
margin_markupConvert between cost, price, gross margin and markup, the same way every time. Send any two that fix the answer: cost and price (get margin, markup and profit); cost and a target margin or markup (get the lowest whole-cent price that meets it); price and a target margin or markup (get the highest whole-cent cost that still meets it); a margin alone (get the same markup) or a markup alone (get the same margin). Or send items (quantity, unit cost, unit price per line, up to 200) to get the blended margin of a basket or order, weighted by revenue. Answer fields: ok, verdict, result, rule, does_not, sources, observation, signature, verify. Errors: ok false with the reason (bad input, too large, hourly limit). Free. No model, no network, nothing you send is stored by the tool, and every answer is signed with LLPRO's key (check it at https://llpro.ai/margin-markup). Not legal, tax or financial advice.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "margin_markup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | No | Unit cost (up to 4 decimals). | |
| items | No | Basket or order lines for a blended margin (up to 200). Send items alone, without the other fields. | |
| price | No | Selling price, before tax (up to 4 decimals). | |
| margin_percent | No | Gross margin in percent of the price (25 for 25%). Below 100. | |
| markup_percent | No | Markup in percent of the cost (50 for 50%). Above -100. |