---
title: "Profit Margin Calculator"
method: POST
path: "/api/v1/tools/profit-margin-calculator"
tags: ["tools"]
---

# Profit Margin Calculator

`POST /api/v1/tools/profit-margin-calculator`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/profit-margin-calculator`
- Auth: HTTP bearer

Gross margin, markup and profit on one sale. In margin mode give the cost and the selling price; in price mode give the cost and the margin you want and it returns the price to charge. Margin is profit over the price, markup is profit over the cost, and both come back either way.

## Request body

- object
  - `mode` string
  - `cost` integer
  - `revenue` integer
  - `targetMarginPercent` integer

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `mode` string
    - `cost` integer
    - `revenue` integer
    - `profit` integer
    - `grossMarginPercent` integer
    - `markupPercent` number

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

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