<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Liu Tenglong]]></title><description><![CDATA[Liu Tenglong]]></description><link>https://liutenglong.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 13:57:20 GMT</lastBuildDate><atom:link href="https://liutenglong.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to estimate US take-home pay in the browser]]></title><description><![CDATA[What comes out of a US paycheck, why one take-home number is not enough, and how to check deductions against official IRS, SSA, and state sources.]]></description><link>https://liutenglong.hashnode.dev/how-to-estimate-us-take-home-pay-in-the-browser</link><guid isPermaLink="true">https://liutenglong.hashnode.dev/how-to-estimate-us-take-home-pay-in-the-browser</guid><category><![CDATA[finance]]></category><category><![CDATA[webdev]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Liu Tenglong]]></dc:creator><pubDate>Thu, 12 Nov 2026 03:27:16 GMT</pubDate><content:encoded><![CDATA[<p>If you have ever compared two job offers, planned a move between states, or tried to reconcile a pay stub with a "salary calculator" result, you already know the hard part is not the gross pay. It is everything that comes out before the deposit hits your account.</p>
<p>A single "take-home" number is convenient, and it is also easy to misuse. US paycheck withholding is a stack of separate rules: federal income tax, Social Security, Medicare, and, in many places, state income tax. Each has its own base, its own official source, and its own habit of changing from one tax year to the next. If you only look at the final net, you cannot tell whether a difference came from a federal withholding method, a state credit, or a FICA wage base that was updated for the new year.</p>
<p>This article walks through what typically comes out of a US paycheck, why you should inspect those lines individually, and how to check a deduction against an official source rather than trusting a black-box percentage.</p>
<h2>What typically comes out of a US paycheck</h2>
<p>Most W-2 employees will see some combination of the following on a stub.</p>
<p><strong>Federal income tax.</strong> This is income tax withheld under IRS rules, not a flat "federal rate" applied to every dollar of gross pay. Withholding depends on filing status, the information on Form W-4, pay frequency, and the tax year. The IRS publishes the official withholding methods and percentage-method tables in Publication 15-T. When a calculator or payroll system shows a federal income-tax line, that publication is the document to compare it against — and you should use the edition for the year you are modeling, not last year's tables.</p>
<p><strong>Social Security and Medicare (FICA).</strong> These are federal payroll taxes, separate from income tax. Social Security tax applies to wages up to an annual wage base that the Social Security Administration updates. Medicare tax applies to wages with different rules, including an Additional Medicare Tax that can apply at higher income levels. The SSA and the IRS are the official sources here; do not assume the wage base or the current-year instructions are unchanged just because last year's stub looked familiar.</p>
<p><strong>State income tax.</strong> This is where estimates diverge the most. Some states have no broad-based wage income tax. Others tax wages with their own brackets, standard deductions, credits, withholding tables, and local additions. A "state tax" line is not a single national formula. The official source is the revenue or tax agency for that state — typically a withholding guide, a booklet of tables, or an employer withholding publication for the tax year in question.</p>
<p>Your stub may also include pretax benefits (such as certain retirement or health contributions), local taxes, or other deductions. Those matter, but they are easy to mix into "take-home" in a way that hides whether the tax lines themselves are right. For an estimate you can defend, separate benefits from statutory tax withholding.</p>
<h2>Why a single take-home number is not enough</h2>
<p>Suppose two tools (or a tool and your payroll stub) disagree by a few hundred dollars a month. The net alone will not tell you why.</p>
<ul>
<li>Federal withholding can differ because of W-4 elections, the IRS percentage method versus a worksheet method, or a mid-year job change that has not yet been annualized the way you expect.</li>
<li>Social Security may stop withholding once wages pass that year's wage base; a calculator that ignores the cap, or that uses the wrong year's cap, will drift in the second half of a high-income year.</li>
<li>State withholding may include credits, local components, or a different definition of taxable wages than federal. Moving from one state to another — or working in a state that is not your state of residence — can change the state line even when federal pay is identical.</li>
<li>Tax years matter. Rates, brackets, wage bases, and withholding procedures are updated on a schedule. An estimate built for 2025 is not automatically valid for 2026, and a 2026 estimate should not be copied forward into 2027 without checking the official sources again.</li>
</ul>
<p>If you are comparing offers or planning a relocation, look at each deduction line, the tax year, and the filing assumptions. The net is the summary, not the explanation.</p>
<h2>How to check a deduction against an official source</h2>
<p>You do not need to become a payroll administrator to sanity-check an estimate. You do need to know where the rule lives.</p>
<ol>
<li><strong>Pick the tax year first.</strong> If you are planning for 2026, use 2026 publications. If you are looking ahead to 2027, check whether the IRS, SSA, or the relevant state agency has published that year's withholding guidance yet. If they have not, treat any 2027 figure as incomplete and go back to the source later rather than inventing a number.</li>
<li><strong>Identify the line.</strong> Is the amount federal income tax, Social Security, Medicare, or state income tax? These are different statutes and different documents.</li>
<li><strong>Open the official publication for that line and year.</strong><ul>
<li>Federal income tax withholding: IRS Publication 15-T and the current Form W-4 instructions, at <a href="https://www.irs.gov">irs.gov</a>.</li>
<li>Social Security wage base and related FICA guidance: the <a href="https://www.ssa.gov">Social Security Administration</a> and IRS payroll publications.</li>
<li>Medicare and Additional Medicare Tax: IRS guidance on those taxes (Publication 15 and the Additional Medicare Tax pages on irs.gov).</li>
<li>State income tax: the state tax agency's withholding tables or employer guide for that year. Search for the state's department of revenue (or equivalent) rather than a secondary blog post.</li>
</ul>
</li>
<li><strong>Compare the inputs, not just the output.</strong> A correct official table still produces a wrong estimate if the filing status, pay frequency, pretax deductions, or state of work is wrong. Write those assumptions down next to the number.</li>
<li><strong>Do not treat a rounded "effective rate" as a substitute.</strong> Effective rates bury the brackets, wage-base caps, and credits that actually drive the result. If you need a number, look it up for the correct year on the official source — or use a calculator that shows the rule and the source next to the line.</li>
</ol>
<p>I am deliberately not quoting specific brackets, percentages, or dollar thresholds here. Those figures change, and a stale number in an article is worse than a pointer to the current publication.</p>
<h2>Estimating in the browser, with the rule next to the line</h2>
<p>Once you know which official documents to trust, a calculator is useful as a worksheet: you enter pay, filing status, and state, then inspect each deduction instead of stopping at the net.</p>
<p><a href="https://statetaxlab.com">StateTaxLab</a> is a free in-browser calculator built for that kind of check. It shows line-by-line deductions together with the rule and a link to the official source, and it keeps your inputs in the browser rather than sending them off to an account. At the time of writing it has dedicated calculators for 19 states, not all 50. If your state is not listed yet, federal income tax, Social Security, and Medicare are still available.</p>
<p>Use it (or any other estimator) as a planning aid, then verify anything high-stakes against the IRS, SSA, or state tax agency publication for the year you care about.</p>
<h2>A practical workflow</h2>
<ol>
<li>Gather gross pay, pay frequency, filing status, and W-4-style elections, plus the state where the wages are taxed.</li>
<li>Run an estimate for a specific tax year — 2026 or 2027, not an unlabeled "current" year.</li>
<li>Read the federal income tax, Social Security, Medicare, and state lines separately.</li>
<li>For any line that looks surprising, open the official source cited next to it (or the IRS / SSA / state publication directly) and confirm the year and the method.</li>
<li>Only then compare the net to a job offer, a budget, or a prior stub.</li>
</ol>
<h2>Disclaimers</h2>
<p>The results of an online paycheck estimate, including results from StateTaxLab, are estimates for planning. They are not tax, legal, or financial advice, and they are not a substitute for official withholding guidance, a payroll system, or a qualified professional. StateTaxLab is not affiliated with the IRS, any state tax agency, or any payroll company.</p>
<p>If you are making a decision that depends on an exact withholding amount — especially around a move, a bonus, or a change in filing status — go back to the official publication for that tax year, or speak with a qualified advisor.</p>
]]></content:encoded></item><item><title><![CDATA[How to test a mouse in the browser: buttons, double-click bounce, polling rate, and DPI]]></title><description><![CDATA[Diagnose mouse buttons, double-click bounce, polling rate, and DPI in the browser, and why Chrome and Edge can read higher than Firefox or Safari.]]></description><link>https://liutenglong.hashnode.dev/how-to-test-a-mouse-in-the-browser-buttons-double-click-bounce-polling-rate-and-dpi</link><guid isPermaLink="true">https://liutenglong.hashnode.dev/how-to-test-a-mouse-in-the-browser-buttons-double-click-bounce-polling-rate-and-dpi</guid><category><![CDATA[webdev]]></category><category><![CDATA[hardware]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Browsers]]></category><dc:creator><![CDATA[Liu Tenglong]]></dc:creator><pubDate>Wed, 11 Nov 2026 22:42:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af4ee232166e1f3022bb237/08a4ea78-b721-4134-8c53-942e3ad8bca5.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A mouse problem is often easy to feel and hard to pin down. You click once and the operating system registers two clicks. The wheel skips a notch. A side button does nothing in one app and works in another. Before you replace the hardware — or decide whether to keep a used mouse — it helps to run a few focused checks.</p>
<p>You do not need to install a utility for this. A browser can observe button events, wheel movement, click timing, and (with some caveats) how often the pointer reports its position.</p>
<h2>Why test a mouse in the browser</h2>
<p>Browser-based tests are useful when you want a quick, repeatable measurement without installing software or creating an account. That is practical in a few common situations:</p>
<ul>
<li>A mouse that used to work reliably has started double-clicking, skipping, or missing buttons.</li>
<li>You are considering a used mouse and want to check the switches and wheel before you keep it.</li>
<li>You game on a PC and care about polling rate, click consistency, or whether the sensor's real DPI matches the setting you selected.</li>
</ul>
<p>One place that puts these checks together is <a href="https://mousetestlab.com">Mouse Test Lab</a>, a set of free in-browser tools to test mouse buttons, scroll, double-click, CPS, and DPI. The tools run in the browser with no install and no sign-up, and results stay on the device.</p>
<h2>Button and double-click bounce checks</h2>
<p>Start with the basics: does every button actually fire, and does it fire once?</p>
<p>A typical desktop mouse exposes left, right, and middle (wheel) buttons, plus one or two side buttons. The scroll wheel should also generate vertical — and sometimes horizontal — wheel events. Click each button in turn and confirm the page records the down and up events. If a side button never registers, the switch may be worn, the firmware may have remapped it, or the operating system may be intercepting it.</p>
<p>Double-click bounce is a different failure. Mechanical switches can bounce: the contacts open and close more than once from a single physical press, so the system sees two clicks. That is the classic "I clicked a file once and it opened" or "I tried to select text and it highlighted a word" symptom.</p>
<p>A good test will timestamp clicks and flag presses that arrive too close together to be intentional. Repeat the test several times, not just once — bounce can be intermittent, especially on a worn left button.</p>
<p>The Mouse Test Lab homepage tests left, right, middle, and side buttons plus the scroll wheel, and can flag double-click bounce.</p>
<h2>Polling rate and why the browser matters</h2>
<p>Polling rate is how often the mouse reports movement to the computer, measured in hertz. A 1000 Hz mouse reports about once per millisecond; 8000 Hz mice report much more frequently. Higher rates can reduce motion latency, which some people care about for games, but only if the software reading the events can actually see them.</p>
<p>This is where the browser matters, and it is easy to misread a result if you skip this detail.</p>
<p>In Chrome and Edge, a polling-rate test can read raw mouse events, so readings above 1000 Hz are possible. Firefox and Safari group events per frame, so the same mouse will often read lower even when the hardware is reporting at a high rate. If you want to verify a 2000 Hz, 4000 Hz, or 8000 Hz setting, run the test in Chrome or Edge. A lower number in Firefox or Safari is usually a limit of how those browsers batch input, not proof that the mouse is stuck at 125 Hz or 1000 Hz.</p>
<p>Related tools on Mouse Test Lab can measure polling rate up to 8000 Hz, along with clicks-per-second, real DPI, scroll-wheel skips, aim accuracy, and common click techniques.</p>
<h2>DPI and scroll</h2>
<p>DPI (dots per inch) describes how far the pointer moves for a given physical movement of the mouse. Manufacturer settings and software profiles do not always match what the sensor is actually doing. A "real DPI" test typically asks you to move the mouse a known physical distance and compares that with the pointer movement the browser sees.</p>
<p>The scroll wheel has its own failure mode: skipped notches. If the wheel encoder is dirty or worn, a single detent can produce no event, two events, or a stutter. A scroll-skip test is more reliable than scrolling a long page and guessing.</p>
<h2>How to run the checks</h2>
<p>A practical sequence:</p>
<ol>
<li>Open the tests in your browser — no install or account is required, and results stay on the device. <a href="https://mousetestlab.com">Mouse Test Lab</a> is a free in-browser option for this.</li>
<li>On the homepage, click every button (left, right, middle, and sides) and move the scroll wheel. Watch for buttons that never register and for double-click bounce flags.</li>
<li>If you care about polling rate, use Chrome or Edge so the test can read raw mouse events. Treat Firefox and Safari readings as frame-batched and therefore often lower.</li>
<li>If DPI or the wheel feels off, run the real DPI and scroll-skip checks as well. Clicks-per-second and aim tools are optional extras if you are comparing techniques or checking consistency under faster clicking.</li>
</ol>
<p>If buttons fail consistently, bounce keeps triggering, or the wheel skips on a reasonably clean surface, the hardware is a likely cause. If everything looks clean in the browser but one application still misbehaves, look at that app's bindings or the operating system's mouse settings next.</p>
]]></content:encoded></item></channel></rss>