about summary refs log tree commit diff stats
path: root/js/freelance.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/freelance.js')
-rw-r--r--js/freelance.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/freelance.js b/js/freelance.js
new file mode 100644
index 0000000..29e0705
--- /dev/null
+++ b/js/freelance.js
@@ -0,0 +1,18 @@
+// can I go freelance?
+
+const a = (r,h,w,ws) => {
+	let income = ((r * h) * w);
+	let tax = income * 0.16; // as of 2024 actual tax rate is more like 15.3%, but I'm rounding to 16%
+	income -= tax;
+	let savings = ws * w;
+	income -= savings;
+	return {
+		income: income,
+		savings: savings, 
+		tax: tax
+	};
+}
+
+const m = a(125,24,48,300);
+
+console.log(`annual income: $${m.income}, annual savings: $${m.savings}, annual tax: $${m.tax}`);
\ No newline at end of file