-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
115 lines (108 loc) · 5.73 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tax Calculator</title>
<script type="text/javascript" src="https://unpkg.com/vue@2.7.14/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/vue2-filters/0.1.9/vue2-filters.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
</head>
<body>
<div class="container" id="app">
<h2 class="my-3">Income tax calculator for Iceland</h2>
<p>
This is a simple tax calculator to help calculate <strong>salaries after tax</strong> in Iceland, in order to see the amount you can actually spend (disposable income).
</p>
<p>
Default values are from <strong>Icelandic ministry of finance</strong> for year
<a href="https://www.rsk.is/einstaklingar/stadgreidsla/stadgreidsla/2024/#tab2" target="_blank">2024.</a>
<br>
<span class="text-muted">
You can change most numbers, in case they have changed and this calculator has not been updated.
</span>
</p>
<p>
Every person also has a <a href="https://www.skatturinn.is/einstaklingar/stadgreidsla/personuafslattur/" target="_blank">tax discount</a> of a fixed number
yearly: {{personalDiscountYear | currency('', 0)}}
monthly: {{personalDiscountYear / 12 | currency('', 0)}}
</p>
<p>Currently there are 3 <a href="https://www.skatturinn.is/einstaklingar/stadgreidsla/skattthrep/2024" target="_blank">tax brackets</a>:</p>
<ul>
<li v-for="item in steps">{{item.taxPct}}% of salaries until {{item.limit | currency('', 0)}} kr.</li>
</ul>
<div class="row">
<div class="col-12 col-lg-7 mb-3">
<label for="original_amount">Total salary per month:</label><br>
<button v-for="item in examples" class="badge bg-secondary m-1" v-on:click="updateTotalSal(item.price)">
{{ item.price }}
</button>
<input class="form-range my-2" type="range" min="0" max="2000000" v-model="totalSalary" />
<div class="input-group input-group my-1">
<span class="input-group-text">Kr</span>
<input type="number" class="form-control" v-model="totalSalary" placeholder="Original Amount" id="original_amount" />
</div>
<label for="personal_discount">Personal discount, yearly</label>
<div class="input-group input-group mb-1">
<span class="input-group-text">Kr</span>
<input type="number" class="form-control" v-model="personalDiscountYear" placeholder="Original Amount" id="original_amount" />
</div>
</div>
<div class="col-12 col-lg-5">
<table class="table table-sm table-bordered table-hover">
<tr class=""><td>Monthly Salary: </td><td>{{ totalSalary | currency('', 0)}}</td></tr>
<tr class="text-success"><td>Monthly tax discount:</td><td>{{ personalMonth| currency('', 0)}}</td></tr>
<tr class="text-muted"><td>Tax from Step1 </td><td>{{ taxFromStep1 | currency('', 0)}}</td></tr>
<tr class="text-muted"><td>Tax from Step2 </td><td>{{ taxFromStep2 | currency('', 0)}}</td></tr>
<tr class="text-muted"><td>Tax from Step3 </td><td>{{ taxFromStep3 | currency('', 0)}}</td></tr>
<tr class="text-danger"><td>Total tax: </td><td>{{ totalTax | currency('', 0)}}</td></tr>
<tr class=""><td><b>Salary remain:</b> </td><td><b>{{ totalLeft | currency('', 0)}}</b></td></tr>
<tr><td>~Actual tax percentage: </td><td>{{ realTax }}%</td></tr>
</table>
</div>
<div class="col-lg-5">
<div class="card">
<h6 class="card-header">Tax rate and limit for each step:</h6>
<div class="card-body">
<div v-for="(item, index) in steps" >
<hr />
<div class="row">
<div class="col">
<p>Tax % in <b>step {{index + 1}} </b></p>
</div>
<div class="col">
<input class="form-control" type="number" min="0" max="100" v-model="item.taxPct" />
</div>
</div>
<div class="row">
<div class="col">
<p>Salary threshold</p>
</div>
<div class="col">
<input class="form-control" type="number" min="0" max="999999" v-model="item.limit" />
</div>
</div>
</div>
</div>
</div> <!-- items -->
</div> <!-- col-12 col-lg-7 -->
</div> <!-- end row -->
<div class="text-muted">
<hr />
<i>This does NOT calculate vacation (ísl: 'orlof') nor what you pay your union (ísl: 'stéttarfélag').</i>
<h6>TODO:</h6>
<input type="checkbox" name="" id="" value="" disabled="disabled" />
Calculate vacation 'orlof' - can be 24-30 days.
<br />
<input type="checkbox" name="" id="" value="" disabled="disabled" />
Calculate union 'Verkalýdsfélag'
</div>
<footer class="my-5">
This code is <a href="https://github.com/viktorsmari/tax-calculator/" target="_blank">free and open source.</a>
<br>
Made by <a href="https://viktorsmari.github.io/" target="_blank">Viktor Smári</a>
</footer>
</div> <!-- cont -->
</body>
<script type="text/javascript" charset="utf-8" src="index.js"></script>
</html>