·3 min read

Software Engineer Salary in Madrid (2026 Guide)

What does a software engineer earn in Madrid? See salary ranges by seniority level, junior, mid, senior, and lead, based on Spanish compensation data.

Software engineer salaries in Madrid vary significantly by seniority. Based on available compensation data for Spain and Madrid specifically, mid-level engineers in Madrid earn a median of €42,000 per year. This page breaks down salary ranges by level and compares Madrid to national and Barcelona benchmarks.

Madrid Software Engineer Salary by Seniority

The most direct Madrid-specific data point available covers mid-level software engineers. According to INE Encuesta de Estructura Salarial (EES) 2022 data, mid-level software engineers in Madrid earn between €33,000 and €54,000 gross per year, with a median of €42,000. For other seniority levels in Madrid specifically, data is not available for [junior, senior, and lead levels at the city level]. National-level figures from the same source are used as the closest available proxy for those tiers.

Spain-Wide Benchmarks by Level

National INE EES 2022 data provides salary ranges across all seniority levels for software engineers in Spain. Junior engineers earn between €22,000 and €32,000, with a median of €26,500. Mid-level engineers nationally earn €30,000 to €48,000, with a median of €37,500. Senior engineers earn €45,000 to €72,000, with a median of €56,000. Lead engineers earn €60,000 to €95,000, with a median of €75,000. Madrid salaries for mid-level roles sit above the national median of €37,500, reflecting the capital's higher cost of living and concentration of tech employers.

Madrid vs. Barcelona: Mid-Level Comparison

Among Spain's two largest tech markets, Madrid edges out Barcelona at the mid level. Madrid mid-level engineers have a median salary of €42,000 (INE EES 2022), compared to €40,500 in Barcelona from the same source. The salary ranges also differ: Madrid spans €33,000 to €54,000, while Barcelona spans €32,000 to €52,000. A separate Levels.fyi-sourced dataset for Barcelona mid-level engineers shows a wider range of €38,000 to €68,000 with a median of €52,000, though that dataset carries a lower confidence rating and may reflect a skew toward larger or international tech companies.

How to Read These Salary Ranges

The figures on this page represent gross annual salary in euros before tax and social security contributions. The minimum and maximum values reflect the typical range across surveyed roles, not absolute floor and ceiling figures. Actual pay depends on factors including company size, industry sector, specific tech stack, and individual negotiation. The INE EES data carries a confidence score of 0.40 and the Levels.fyi Barcelona data a score of 0.45, indicating moderate confidence. Users should treat these figures as directional benchmarks rather than precise market rates.

Data Sources and Methodology

This page draws on three datasets: the Spanish National Statistics Institute Encuesta de Estructura Salarial (INE EES 2022), Eurostat Structure of Earnings Survey (SES 2022), and Levels.fyi self-reported compensation data. The INE EES and Eurostat SES are survey-based sources covering a broad cross-section of Spanish employers. Levels.fyi data tends to skew toward larger tech companies and higher compensation bands. Where multiple sources exist for the same seniority tier, figures are presented separately to preserve transparency. All salary data is in EUR.

Use the SalaryVerdict benchmarking tool to compare your current salary against these ranges and see how your compensation stacks up for your seniority level and location.

Find out if you're underpaid

Enter your role, location, and salary. Takes 30 seconds.

Check my salary →