URSY.DEVPART OF THE URSY NETWORKSign inBuild with URSY

Every contract sourcedEvery check datedGaps shown, never filledBuild with URSY

Capabilities

Profit Margin Calculator

Calculate gross profit, margin or markup from cost and selling price.

How this capability is exposed

Stable ID
ursy.io:profit-margin-calculator
Owning service
URSY.io
Runtime
@ursy/runtime · 1.0.0
Execution modes
browser, node, mcp-local, remote_transient
Remote execution
Available at the owning service
Remote endpoint
https://api.ursy.io/v1/run
Input schemaOutput schemaOpen the owning interface ↗

Capability declarations describe what the service exposes. They are not a guarantee of availability or permission to execute an operation.

Accepted contract

REGISTRY JSON
{
    "schema": "ursy.io/capability/v1",
    "id": "ursy.io:profit-margin-calculator",
    "slug": "profit-margin-calculator",
    "name": "Profit Margin Calculator",
    "version": "1.0.0",
    "summary": "Calculate gross profit, margin or markup from cost and selling price.",
    "intents": [
        "profit margin calculator"
    ],
    "aliases": [],
    "keywords": [],
    "category": "business-tools",
    "deterministic": true,
    "side_effects": false,
    "network_required": false,
    "execution": {
        "preferred": "local",
        "supported": [
            "browser",
            "node",
            "mcp-local",
            "remote_transient"
        ],
        "local_executable": true,
        "remote_safe": true,
        "remote_enabled": true,
        "remote_endpoint": "https://api.ursy.io/v1/run"
    },
    "privacy": {
        "input_leaves_device_by_default": false,
        "payload_logged": false
    },
    "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
            "cost": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000,
                "description": "User-selected currency."
            },
            "price": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000,
                "description": "Same currency as cost."
            },
            "locale": {
                "type": "string",
                "minLength": 2,
                "maxLength": 35,
                "pattern": "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$",
                "default": "en-US",
                "description": "Locale for display text; numerical result fields are locale independent."
            }
        },
        "required": [
            "cost",
            "price"
        ],
        "additionalProperties": false
    },
    "output_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
            "text": {
                "type": "string",
                "maxLength": 26214400
            },
            "metrics": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": [
                        "label",
                        "value"
                    ],
                    "properties": {
                        "label": {
                            "type": "string",
                            "maxLength": 100
                        },
                        "value": {
                            "type": [
                                "string",
                                "number"
                            ],
                            "maxLength": 1000
                        }
                    },
                    "additionalProperties": false
                },
                "maxItems": 10
            },
            "profit": {
                "type": "number",
                "minimum": -1000000000000000,
                "maximum": 1000000000000000,
                "description": "Same currency as cost."
            },
            "margin": {
                "type": [
                    "number",
                    "null"
                ],
                "description": "Percent; null when price is zero."
            },
            "markup": {
                "type": [
                    "number",
                    "null"
                ],
                "description": "Percent; null when cost is zero."
            }
        },
        "required": [
            "text",
            "metrics",
            "profit",
            "margin",
            "markup"
        ],
        "additionalProperties": false
    },
    "examples": [
        {
            "input": {
                "cost": 60,
                "price": 100
            },
            "output": {
                "text": "Profit = selling price - cost = 40\nMargin = profit / selling price \u00d7 100 = 40%\nMarkup = profit / cost \u00d7 100 = 66.67%",
                "metrics": [
                    {
                        "label": "Profit",
                        "value": "40"
                    },
                    {
                        "label": "Margin",
                        "value": "40%"
                    },
                    {
                        "label": "Markup",
                        "value": "66.67%"
                    }
                ],
                "profit": 40,
                "margin": 40,
                "markup": 66.66666666666666
            }
        }
    ],
    "limits": {
        "max_input_bytes": 5308416,
        "max_output_bytes": 26214400,
        "max_json_depth": 100,
        "max_csv_cells": 1000000
    },
    "canonical_url": "https://ursy.io/business-tools/profit-margin-calculator/",
    "descriptor_url": "https://ursy.io/wp-json/ursy-tools/v2/capabilities/profit-margin-calculator",
    "runtime": {
        "package": "@ursy/runtime",
        "version": "1.0.0",
        "module": "@ursy/runtime",
        "entry": "run",
        "slug": "profit-margin-calculator"
    },
    "health": {
        "status": "ok",
        "last_tested": "2026-09-11T17:24:33.220Z",
        "runtime_version": "1.0.0",
        "golden_fixtures": 2,
        "node_contract_tests": 2,
        "browser_verified": true,
        "tests_passed": 7,
        "tests_total": 7,
        "test_suite": "tests/runtime-canary.test.mjs",
        "browser_suite": "tests/runtime-browser.py"
    },
    "audit": {
        "classification": "A",
        "engine": "calculator",
        "mode": "margin-markup",
        "headless_possible": true,
        "notes": "Deterministic calculation/text core can be separated from the existing DOM workbench; schemas and regression fixtures remain required."
    },
    "assumptions": [],
    "formulae": [],
    "input_schema_id": "ursy.io:profit-margin-calculator:input_schema",
    "output_schema_id": "ursy.io:profit-margin-calculator:output_schema",
    "service_id": "ursy-io",
    "parent_id": "",
    "source_url": "https://ursy.io/wp-json/ursy-tools/v2/catalog",
    "source_type": "capability_manifest",
    "verified_at": "2026-10-14 04:02:18",
    "revision": "4f7c260e9a679bd98894d7291509209e32b8f9a5bb0e03618f7ede0bbe8b51d6",
    "type": "capabilities",
    "source": {
        "url": "https://ursy.io/wp-json/ursy-tools/v2/catalog",
        "type": "capability_manifest"
    },
    "last_verified_at": "2026-10-14 04:02:18",
    "stale": false
}