Skip to content

Instantly share code, notes, and snippets.

@joaoqalves
Created February 7, 2021 10:34
Show Gist options
  • Save joaoqalves/7d38c9c4f79b5d7325729f0645c19f94 to your computer and use it in GitHub Desktop.
Save joaoqalves/7d38c9c4f79b5d7325729f0645c19f94 to your computer and use it in GitHub Desktop.
Tramos IRPF
// Fuente: https://cincodias.elpais.com/herramientas/calculadora-irpf/
var datos = {
// (*) ESTATAL
'E':[
[0, 12450, 9.5],
[12450, 20200, 12],
[20200, 35200, 15],
[35200, 60000, 18.5],
[60000, 999999999999, 22.5],
],
//Andalucía
'1':[
[0, 12450, 10],
[12450, 20200, 12],
[20200, 28000, 15],
[28000, 35200, 16.5],
[35200, 50000, 19],
[50000, 60000, 19.5],
[60000, 120000, 23.5],
[120000, 999999999999, 25.5],
],
// Aragón
'2':[
[0, 12450, 10],
[12450, 20200, 12.5],
[20200, 34000, 15.5],
[34000, 50000, 19],
[50000, 60000, 21],
[60000, 70000, 22],
[70000, 90000, 22.5],
[90000, 130000, 23.5],
[130000, 150000, 24.5],
[150000, 999999999999, 25],
],
// Asturias
'3':[
[0, 12450, 10],
[12450, 17707.2, 12],
[17707.2, 33007.2, 14],
[33007.2, 53407.2, 18.5],
[53407.2, 70000, 21.5],
[70000, 90000, 22.5],
[90000, 175000, 25],
[175000, 999999999999, 25.5],
],
// Baleares
'4':[
[0, 10000, 9.5],
[10000, 18000, 11.75],
[18000, 30000, 14.75],
[30000, 48000, 17.75],
[48000, 70000, 19.25],
[70000, 90000, 22],
[90000, 120000, 23],
[120000, 175000, 24],
[175000, 999999999999, 25],
],
// Canarias
'5':[
[0, 12450.01, 9.5],
[12450.01, 17707.21, 12],
[17707.21, 33007.21, 14],
[33007.21, 53407.21, 18.5],
[53407.21, 90000.01, 23.5],
[90000.01, 999999999999, 24],
],
// Cantabria
'6':[
[0, 12450, 9.5],
[12450, 20200, 12],
[20200, 34000, 15],
[34000, 46000, 18.5],
[46000, 60000, 19.5],
[60000, 90000, 24.5],
[90000, 999999999999, 25.5],
],
// Castilla y León
'7':[
[0, 12450, 9.5],
[12450, 20200, 12],
[20200, 35200, 14],
[35200, 53407.20, 18.5],
[53407.20, 999999999999, 21.5],
],
// Castilla-La Mancha
'8':[
[0, 12450, 9.5],
[12450, 20200, 12],
[20200, 35200, 15],
[35200, 60000, 18.5],
[60000, 999999999999, 22.5],
],
// Cataluña
'9':[
[0, 17707.2,12],
[17707.2, 33007.2, 14],
[33007.2, 53407.2, 18.5],
[53407.2, 120000.2, 21.5],
[120000.2, 175000.2, 23.5],
[175000.2, 999999999999, 25.5],
],
// Comunidad Valenciana
'10':[
[0, 12450, 10],
[12450, 17000, 11],
[17000, 30000, 13.9],
[30000, 50000, 18],
[50000, 65000, 23.5],
[65000, 80000, 24.5],
[80000, 120000, 25],
[120000, 999999999999, 25.5],
],
// Extremadura
'11':[
[0, 12450, 9.5],
[12450, 20200, 12.5],
[20200, 24200, 15.5],
[24200, 35200, 16.5],
[35200, 60000, 20.5],
[60000, 80200, 23.5],
[80200, 99200, 24],
[99200, 120200, 24.5],
[120200, 999999999999, 25],
],
// Galicia
'12':[
[0, 12450, 9.5],
[12450, 20200, 11.75],
[20200, 27700, 15.5],
[27700, 35200, 17],
[35200, 47600, 18.5],
[47600, 60000, 20.5],
[60000, 999999999999, 22.5],
],
// La Rioja
'13':[
[0, 12450, 9.5],
[12450, 20200, 11.6],
[20200, 35200, 14.6],
[35200, 50000, 19],
[50000, 60000, 19.5],
[60000, 120000, 23.5],
[120000, 999999999999, 25.5],
],
//
// Madrid
'14':[
[0, 12450, 9.5],
[12450, 17707, 11.2],
[17707, 33007, 13.3],
[33007, 53407, 17.9],
[53407, 999999999999, 21],
],
// Murcia
'15':[
[0, 12450, 10],
[12450, 20200, 12.5],
[20200, 34000, 15.5],
[34000, 60000, 19.5],
[60000, 999999999999, 23.5],
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment