Calculadora de porcentajes

Calcula rápidamente porcentajes, descuentos, impuestos y propinas.

// about

Sobre esta herramienta

Introduce un importe y un porcentaje para calcular el valor del porcentaje y el importe tras sumarlo.

Cómo usarla

  1. Introduce el número o importe original.
  2. Introduce el porcentaje.
  3. Pulsa Calcular para ver el importe del porcentaje y el total.

Por qué usar esta herramienta

  • Sirve para precios, impuestos, propinas, descuentos, presupuestos y cálculos generales.
  • Muestra tanto la parte porcentual como el total final.
  • Usa aritmética decimal para que los valores monetarios se mantengan precisos.
Guías · Cálculo · 7 min de lectura

Cálculo de porcentajes explicado: variación porcentual, puntos porcentuales, descuentos acumulados e IVA

¿Cuánto crecieron las ventas? ¿Cuál es el precio rebajado? ¿El tipo de interés subió un uno por ciento o un punto? Los porcentajes parecen sencillos, pero elegir mal la base cambia la respuesta.

Un porcentaje es una proporción expresada por cada cien. Todo cálculo de porcentajes se reduce a elegir la base correcta (el denominador), y la mayoría de los casos cotidianos encajan en una de estas cuatro fórmulas.

① ¿Cuánto es el B % de A?      A × B ÷ 100          (15 % de 80.000 = 12.000)
② ¿Qué % de B es A?           A ÷ B × 100          (12 ÷ 48 × 100 = 25 %)
③ Variación de A a B          (B − A) ÷ A × 100    (200 → 250 = +25 %)
④ A aumentado/reducido un B % A × (1 ± B ÷ 100)    (50.000 + 20 % = 60.000)
Cuatro fórmulas básicas, porcentaje y punto porcentual, por qué 20 % y luego 10 % no son un 30 % y cómo desglosar el IVA de un precio final.
Leer guía →
Créalo con IA

Crea esta herramienta tú mismo con IA

¿Quieres tu propia versión? Copia el prompt en un chat de IA o guarda el archivo de skill para un agente de programación. Incluyen las funciones, casos límite y pruebas que usamos al crearla.

El prompt y la skill están en inglés, que las herramientas de IA entienden perfectamente.

Prompt de instrucciones para IA

Pégalo tal cual en Claude, ChatGPT o Gemini.

You are an experienced full-stack web developer. Build a web tool called "Calculadora de porcentajes" that meets the requirements below.

## Goal

Build a calculator for everyday percentage tasks: share, percent change, increases/decreases and reverse calculations.

## Core features

- What is B% of A
- A is what percent of B
- Percent change from A to B
- Increase or decrease A by B%
- Original price from a discounted price

## Inputs

- Two numbers per calculation type

## Outputs

- Result
- Formula and working shown step by step

## Edge cases and handling rules

- Explain division by zero when the base is 0
- Support negative and decimal numbers
- Rounding option to hide floating-point noise
- Note on percent versus percentage points

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- 15% of 80000 = 12000
- Change from 200 to 250 = 25%
- If 72000 is 20% off, the original is 90000

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

Skill (SKILL.md)

Guárdalo como .claude/skills/build-percent-calculator/SKILL.md para que agentes como Claude Code lo reutilicen cada vez que crees o cambies la herramienta.

---
name: build-percent-calculator
description: Use when building or changing a Calculadora de porcentajes tool. Build a calculator for everyday percentage tasks: share, percent change, increases/decreases and reverse calculations.
---

# Build: Calculadora de porcentajes

## Goal

Build a calculator for everyday percentage tasks: share, percent change, increases/decreases and reverse calculations.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- What is B% of A
- A is what percent of B
- Percent change from A to B
- Increase or decrease A by B%
- Original price from a discounted price

## Inputs

- Two numbers per calculation type

## Outputs

- Result
- Formula and working shown step by step

## Rules

- Explain division by zero when the base is 0
- Support negative and decimal numbers
- Rounding option to hide floating-point noise
- Note on percent versus percentage points
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] 15% of 80000 = 12000
- [ ] Change from 200 to 250 = 25%
- [ ] If 72000 is 20% off, the original is 90000

Consejos para trabajar con IA

  • Indica tu stack (React, Vue o HTML puro) en la primera línea para obtener código adecuado.
  • Pide que ejecute las pruebas listadas y muestre los resultados antes de aceptar el código.
  • No pegues contraseñas reales, datos de clientes ni claves de API; usa valores de ejemplo.