about summary refs log tree commit diff stats
path: root/widgets
ModeNameSize
-rw-r--r--account-wizard.go20977log stats plain blame
-rw-r--r--account.go5239log stats plain blame
-rw-r--r--aerc.go6828log stats plain blame
-rw-r--r--compose.go10886log stats plain blame
-rw-r--r--dirlist.go4445log stats plain blame
-rw-r--r--exline.go1326log stats plain blame
-rw-r--r--msglist.go4239log stats plain blame
-rw-r--r--msgviewer.go12938log stats plain blame
-rw-r--r--providesmessage.go282log stats plain blame
-rw-r--r--spinner.go1370log stats
// can I go freelance?
// doing some math to see if I can afford to go freelance, or what it'd take to do it

// r is hourly rate
// h is hours per week
// w is weeks per year
// ws is weeks of savings
// returns object with income, savings, and tax where income is after tax and savings are subtracted

const a = (r, h, w, ws) => {
  let income = (r * h) * w;
  const tax = income * 0.16; // as of 2024 actual tax rate is more like 15.3%, but I'm rounding to 16%
  income -= tax;
  const savings = ws * w;
  income -= savings;
  return {
    income: income,
    savings: savings,
    tax: tax,
  };
};

const m = a(125, 24, 48, 300); // $125/hr, 24 hours/week, 48 weeks/year, saving $300 a week
console.log(
  `annual income: $${m.income}, annual savings: $${m.savings}, annual tax: $${m.tax}`,
);

const n = a(100, 30, 48, 300); // $100/hr, 30 hours/week, 48 weeks/year, saving $300 a week
console.log(
  `annual income: $${n.income}, annual savings: $${n.savings}, annual tax: $${n.tax}`,
);

const o = a(75, 30, 48, 300); // $75/hr, 40 hours/week, 48 weeks/year, saving $300 a week
console.log(
  `annual income: $${o.income}, annual savings: $${o.savings}, annual tax: $${o.tax}`,
);