# Calculadora de margen > ¿Cuánto margen ganas con una venta? Calcula el margen de beneficio, el markup y el beneficio a partir del coste y el precio de venta. Calcula el margen de beneficio y el markup con el coste y el precio de venta de una unidad, con o sin IVA. Mira el beneficio por venta y el precio sin IVA. - Page: https://how.box/es/margin/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/es/about/terms/ ## Inputs Answer link: https://how.box/es/margin/?currency={currency}&c={c}&p={p}&v={v}&m={m}&t={t} - `currency` (AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UYW, UZS, VES, VND, VUV, WST, XAF, XCD, XCG, XDR, XOF, XPF, XSU, YER, ZAR, ZMW, ZWG or ZWL): Currency the amounts are in (ISO 4217); no conversion. Example: `EUR`. - `c` (number 0.01 to 1e9): Unit cost excluding VAT. Example: `60`. - `p` (number 0.01 to 1e9): Selling price including the VAT in v (mode margin). Example: `100`. - `v` (number 0 to 100): VAT percent included in the price. Example: `0`. - `m` (margin or price): What to find: margin (default) or price. Example: `price`. - `t` (number 0 to 100): Target margin percent (mode price). Example: `40`. Example answer: https://how.box/es/margin/?currency=EUR&c=60&p=100&v=0&m=price&t=40 A complete link carries the primary answer in the page HTML; a missing or invalid value shows the default page. ## Agent tools - `margin_calculate`: Profit margin and markup of one unit from its cost (excluding VAT) and selling price (including vat_percent VAT; 0 when the price is net), both in the same currency. - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"margin_calculate","arguments":{"currency":"EUR","cost":60,"price":100,"vat_percent":0,"mode":"price","target_margin_percent":40}}}` - GET: https://how.box/mcp/run/margin_calculate?currency=EUR&cost=60&price=100&vat_percent=0&mode=price&target_margin_percent=40 ## How it works El margen y el markup comparan tu beneficio con un precio, pero no con el mismo. El margen divide el beneficio entre el precio de venta; el markup (recargo sobre el coste) lo divide entre el coste. Por eso la misma venta siempre tiene un markup mayor que su margen. Con un coste C y un precio de venta P sin IVA, el beneficio es P − C, el margen es (P − C) ÷ P × 100 y el markup es (P − C) ÷ C × 100. Un precio con IVA se divide primero entre (1 + tipo de IVA), porque el IVA es para Hacienda, no para ti. Las definiciones siguen OpenStax, Contemporary Mathematics, sección 6.2. Es el margen bruto de una unidad. No incluye gastos generales, descuentos, envío ni impuesto sobre la renta. Un resultado negativo significa que vendes con pérdidas. ## FAQ **¿Qué diferencia hay entre margen y markup?** El margen es el beneficio como parte del precio de venta; el markup, el beneficio como parte del coste. Un beneficio de 40 € sobre un precio de 100 € es un margen del 40 %, pero un markup del 66,7 % sobre el coste de 60 €. **¿Debo introducir los precios con o sin IVA?** Introduce el coste sin IVA. Para el precio de venta, introduce lo que paga el cliente y el tipo de IVA que incluye, o el precio neto con un IVA del 0 %. **¿Puede el margen superar el 100 %?** No. El margen siempre queda por debajo del 100 % porque el beneficio siempre es menor que el precio. El markup no tiene límite: vender al triple del coste es un markup del 200 %. **¿Cómo paso un markup a margen?** Margen = markup ÷ (100 + markup) × 100. Un markup del 50 % equivale a un margen del 33,3 %. **¿Puede mostrar una pérdida?** Sí. Si el precio de venta sin IVA es inferior al coste, el beneficio, el margen y el recargo son negativos. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/es/about/agents/)