Finance Utilities

Calculate Markup

Calculates selling price from cost and markup percentage using precise financial formulas. Access via MCP in Cursor or Windsurf, or call GET /v1/finance/markup directly. Input cost=$100, markup=25% → returns selling_price=$125.00. Handles both percentage and decimal markup formats with proper rounding for currency calculations.

API Endpoint

GET /v1/finance/markup

Code Examples

curl "https://tinyfn.io/v1/finance/markup" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/finance/markup', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/finance/markup',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's finance tools:

{
  "mcpServers": {
    "tinyfn-finance": {
      "url": "https://tinyfn.io/mcp/finance",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I calculate selling price with markup percentage using MCP?

Pass cost and markup_percent parameters to the tool. For a $50 item with 30% markup, it returns $65.00 selling price.

What's the difference between markup and margin in pricing?

Markup adds percentage to cost (cost + markup = price). Margin is percentage of selling price. This tool calculates markup only.

Does the markup calculator handle decimal markup values?

Yes, accepts both percentage (25) and decimal (0.25) formats. Results are rounded to two decimal places for currency precision.

Can AI agents use this for dynamic pricing calculations?

Absolutely. MCP integration lets Cursor and other AI tools calculate real-time pricing without hallucinating financial formulas.

What happens with negative markup or zero cost inputs?

Negative markup creates discounted prices below cost. Zero cost returns the markup amount as the selling price.

Try Calculate Markup Now

Get your free API key and start using Calculate Markup in seconds.

Get Free API Key