· career · 7 min read
How to Calculate Your Worth as a JavaScript Engineer: The Numbers Game
A practical, data-driven guide to calculating your market value as a JavaScript engineer - from gathering salary data and valuing equity to building confident negotiation ranges and scripts.

Outcome first: by the end of this post you’ll have a repeatable method to convert messy salary data into a clear, defensible number (and a negotiation range) you can use in job applications and offers. You’ll walk into conversations with confidence, not guesswork.
Why this matters. Companies buy outcomes. You sell impact. But most engineers sell themselves under price, not on value. This guide fixes that by turning salary research into arithmetic and narrative.
The short version - your action plan
- Collect market data from 3–5 sources (surveys, postings, pay sites).
- Adjust for location, role, and seniority.
- Convert salary + bonuses + equity into a single annualized Total Compensation (TC) number.
- Build a three-point negotiation range: Stretch / Target / Walk-away.
- Present numbers confidently with evidence and an outcomes frame.
Now the deep dive.
1) Where to gather reliable salary signals
Don’t rely on one site. Each has bias. Combine them.
- Industry-wide surveys: Stack Overflow Developer Survey gives broad trends across languages and experience levels. https://insights.stackoverflow.com/survey
- Tech-specific salary databases: Levels.fyi has granular data for tech companies and shows base, bonus, and equity separately. https://www.levels.fyi
- Job boards and postings: LinkedIn, Indeed, and Glassdoor let you see real listed salaries and required skills. https://www.glassdoor.com
- Marketplaces and recruiting platforms: Hired and Triplebyte show what companies actively pay to hire. https://hired.com
- Government / macro data: Bureau of Labor Statistics (for software dev medians and regional adjustments). https://www.bls.gov
Tip: capture at least one data point of each type (survey, crowdsourced site, job postings, company-specific comp) for the role and level you want.
2) Normalize for the variables that actually move pay
Salary is not just “role = JavaScript engineer”. Adjust for:
- Seniority: Junior / Mid / Senior / Staff / Principal. Define your level by impact, not years.
- Location / remote premium: Bay Area, NYC, London, Berlin vs. smaller markets. Use cost-of-living and local market modifiers.
- Company size & stage: Big FAANG-like firms and well-funded startups pay differently; startup equity compensates differently than cash.
- Specialization: Front-end vs. full-stack vs. Node backend vs. performance/security expertise.
- Demand for specific skills: React, TypeScript, GraphQL, serverless, WebAssembly - those move the needle.
- Benefits & flexibility: PTO, parental leave, learning budgets, free meals - these have monetary value.
A simple normalization approach: express every salary datapoint as a percentage of a local-market baseline for the same seniority. Doing that lets you compare across cities and company types.
3) How to compute Total Compensation (TC)
Total Compensation = Base Salary + Expected Bonus + Annualized Equity Value + Perks Value
- Base Salary: straightforward.
- Expected Bonus: use target bonus percentage (e.g., 10% of base) or median observed bonus.
- Annualized Equity Value: if equity is offered (options or RSUs), compute expected yearly value.
- For RSUs: use grant value / vesting years. Example: 48 RSUs vesting over 4 years with a fair-market grant price -> annualized = grant_value / 4.
- For options: use conservative annualized value = (expected future value * probability) / vesting years. Be conservative - assume discount for liquidity and risk.
- Perks Value: add estimated dollar value for paid health, 401(k) match, learning stipend, commuting, etc. Use conservative estimates.
Example calculation (hypothetical):
- Base: $140,000
- Target bonus: 10% of base = $14,000
- RSUs grant: $80,000 over 4 years -> annualized = $20,000
- Perks (401k match, healthcare, learning) = $6,000
- TC = 140,000 + 14,000 + 20,000 + 6,000 = $180,000
JavaScript snippet: simple TC calculator
function totalComp({
base,
bonusPct = 0,
equityGrant = 0,
equityYears = 4,
perks = 0,
}) {
const bonus = base * (bonusPct / 100);
const equityAnnual = equityGrant / equityYears;
return base + bonus + equityAnnual + perks;
}
// Example
console.log(
totalComp({
base: 140000,
bonusPct: 10,
equityGrant: 80000,
equityYears: 4,
perks: 6000,
})
); // 1800004) Use percentiles to set realistic expectations
Translate your data into percentiles. Ask: do I sit at the 50th, 75th, or 90th percentile for my stack and level?
- 50th percentile = market median (reasonable expectation).
- 75th percentile = above-average performers with sought-after skills.
- 90th percentile = exceptional, rare experience or leading small teams.
Compute percentiles across your gathered TC datapoints and place yourself where your skills and impact actually belong.
5) Build a three-number negotiation range
Don’t give a single figure. Give a range anchored by real math.
- Stretch (ask): the top of your realistic percentile band (e.g., 75th–90th).
- Target (expect): where you want to land (e.g., 60th–75th).
- Walk-away (floor): your minimum TC to accept after all tradeoffs.
A practical rule of thumb: set your ask ~10–20% above your target to leave room to negotiate.
Example (continuing above):
- Walk-away: $165k (minimum acceptable after perks and growth opportunities)
- Target: $180k (calculated TC matched to median-plus skills)
- Stretch (ask): $200k (anchored to 75th+ market datapoints)
6) How to present the numbers confidently
Be data-first, outcome-focused, and succinct. Use this structure:
- One-line framing: “Based on market data for senior JavaScript engineers in [city/remote], my expected total compensation is…”
- Evidence: cite 2–3 sources and the metrics (median base, equity ranges).
- Range: provide your three-point range and your preferred structure (e.g., more base vs. more equity).
- Impact statement: link your ask to the outcomes you’ll deliver.
Short example phrasing for a negotiation call or email:
“Based on market data from Levels.fyi, Glassdoor, and the Stack Overflow survey for senior JavaScript engineers in [region], the market median total compensation is about $X–$Y. Given my results building high-throughput React apps and mentoring junior engineers, I’m targeting a TC of $180k (range $165k–$200k). I’m flexible on mix between base and equity.”
Don’t say: “I need X.” Say: “The market supports X, and here’s how I will deliver it.”
7) Common negotiation mechanics and traps
- Trap: Accepting a low base with a lottery-like equity grant. If you need cash for living costs, favor base.
- Trap: Comparing raw equity counts between companies without accounting for valuation and dilution.
- Rule: If offered equity, ask for grant details (type, strike price, valuation, expected dilution) and model a conservative expected value.
- Use anchoring: put your ask first. If the employer asks for your expectations, give a range backed by data.
8) How to value equity conservatively
- RSUs: annualized grant value is a fair assumption (grant_value / vest_years).
- Options: consider a probability-adjusted payout and discount for liquidity. A quick heuristic: treat options at 25–50% of headline grant value unless you have data on growth and exit probability.
Document equity assumptions when you quote TC so the hiring manager understands your math.
9) Translate non-salary perks into dollars
Put conservative dollar values on benefits that matter:
- Health benefits: employer contribution difference = $X
- 401(k) match: annual employer contribution = base * match_pct
- Learning / conference stipend: direct value
- Remote / relocation: moving stipend or home office budget
If a company offers unmatched perks, ask to convert a portion into salary if that’s more important to you.
10) Negotiation tactics that work (and why)
- Lead with data, not emotion. Data is hard to dispute.
- Tell a short story: “Here’s how I’ve delivered value and how I’ll scale it here.”
- Be specific about mix: “I prefer higher base, but I’ll accept more equity if base moves less than X%.”
- Be willing to walk: a credible walk-away gives weight to your range.
- Ask questions: If they can’t meet comp, ask for performance-based review date and target for bumping salary.
Quick checklist before you accept
- Have you computed TC conservatively and included perks?
- Is your minimum (walk-away) realistic for your lifestyle?
- Do you understand the equity mechanics?
- Is there an agreed timeline for compensation review or promotion?
- Does the role align with the skills that will raise your market value next time?
Final example - putting it together
You’re a mid-senior JavaScript engineer, remote, living in Austin. You gather data: Levels.fyi shows median base $135k for similar roles; Glassdoor postings average $125–145k; Stack Overflow survey ranks JavaScript high in demand for front-end. After adjustments for remote and specialties (TypeScript + React + GraphQL), you compute:
- Base target: $140k
- Bonus: 10% -> $14k
- Equity (annualized conservative): $12k
- Perks: $4k
- TC target = $170k
Range: Walk-away = $155k, Target = $170k, Stretch = $190k.
You present: “Based on Levels.fyi, Glassdoor, and the Stack Overflow survey for similar roles, I’m targeting a total compensation of $170k (range $155k–$190k). I prefer a higher base but am open to balancing equity. Given my work leading front-end migrations and shipping measurable performance gains, I think this aligns with the value I’ll deliver.”
The strongest move is the last one: back your math with outcomes. Numbers alone get you to the table. Outcomes get you the offer.
References and further reading
- Stack Overflow Developer Survey - https://insights.stackoverflow.com/survey
- Levels.fyi - https://www.levels.fyi
- Glassdoor - https://www.glassdoor.com
- Hired - https://hired.com
- U.S. Bureau of Labor Statistics - https://www.bls.gov



