Aaron Saray

open source programmer,
web developer

entrepreneur, author
and musician

My Blog

contains PHP, Web and business/entrepreneurial related content. Please join in the conversation!

Bookmarklet: Wage Calculator

While searching for employment, I realize I can’t be super picky – but my household does have needs! Because of this, I’ve developed a quick calculator / bookmarklet for the browser that I thought I’d share. It allows you to enter a yearly or hourly amount, and it shows the corresponding amounts. This tells you if that salary posting fits within your needs.

Features

  • Takes hourly or yearly wage. If amount is 200 or greater, assumes its a yearly amount.
  • Shows wages in yearly, monthly and hourly
  • Shows Gross, Company Net (assuming 25% tax bracket relatively), Independent Net (assuming 25% + 15.3% tax for medicare/social security, etc)
  • Configurable to take in other rates of tax

Here’s the bookmarklet – drag it to your book mark bar: Calculate Wage

The UnMinified version:

?View Code JAVASCRIPT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    function bookmarklet()
    {
        var independentTax = 15.3;
        var taxBracket = 25;
        var amount = prompt('amount:');
        if (amount) {
            if (amount < 200) {
                amount *= 2080; // 40 hrs a week/ 52 weeks
            }
            var output = "Gross: $" + amount + "/yr - $" + Math.round(amount/12) + "/mo - $" + Math.round(amount/2080) + "/hr\n";
            var taxminus = amount * (taxBracket/100);
            output += "Cmp Net: $" + Math.round(amount-taxminus) + "/yr - $" + Math.round((amount-taxminus)/12) + "/mo - $" + Math.round((amount-taxminus)/2080) + "/hr\n";
            taxminus = amount * ((taxBracket+independentTax)/100);
            output += "Ind Net: $" + Math.round(amount-taxminus) + "/yr - $" + Math.round((amount-taxminus)/12) + "/mo - $" + Math.round((amount-taxminus)/2080) + "/hr";
            alert(output);
        }
    }

This entry was posted in javascript and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>