Press "Enter" to skip to content

Huahua's Tech Road

美国程序员收入几何?要交多少税?

无论是在中国还是美国,程序员/软件工程师都是视为高收入人群。并不是因为收入真的很高,而是比起大多数(隐形)高收入行业来说公开透明,被讨论的比较多而已。

今天花花就和大家一起聊一下美国程序员的收入情况。主要内容分三块:收入的组成,大厂之间收入的横向比较,税务问题。

Part 1. 收入的组成

年薪(Package)

  1. 基本工资(Base salary):基本工资主要由级别决定,不同级别之间的差距不大。每级可能差10%左右。
  2. 奖金(Bonus):和基本工资挂钩,是基本工资的10%~25%,主要由公司业绩和个人绩效决定。
  3. 股票(RSU):一般来说股票每年都会refresh,每次奖励都要要分4年来发,有些公司每年25%,有些公司第一年只有5%。如果你提前离职,后面的股票就都没了。奖励时的金额和级别/个人表现有关,最后(卖出时)的收入则和公司股价直接成正比。比如奖励$10,000的RSU,近期公司股价$50,则为200股。4年后公司股价涨到$100,就变成了$20,000(这里有没有考虑税的问题)。对于高级别员工来说,股票是大头,可能比基本工资还要高。

一次性补贴

  1. 签字费(Sign-on Bonus):$20,000 ~ $100,000+ 不等,不同厂家之间区别很大。通常需要保证工作一年以上,不然需要退回。
  2. 搬家费(Relocation Bonus):$3,000 ~ $10,000 不等。可用于搬场,汽车运输,租车等。
  3. 临时居住(Corporate housing):有些公司对外地/外国员工提供14-30天不等的临时居住,通常为酒店式公寓。名义价值$250+/天。也就是$3,500 ~ $7,500的价值。利用这个时间段去找公寓就不会显得手忙脚乱,同时也可以剩下一笔小钱。湾区一居室的公寓基本上都要$3,000/月,和别人合租的话可以降低到$1,500~$2,000/月。当然住私人、远一些或者条件比较差的(比如车库)可以再降低到$1,000/月。

福利

  1. 401K 公司匹配(Employer match)401K是美国的退休计划(养老金),主要由个人出资(每年有上限),可以用来投资基金,实现财富增长,并提供一部分税收优惠。公司会匹配员工的投资,通常为30%~50%(50%是上限)。目前401K每年上限为$19,500,公司最多匹配$9,750。如果你不存放401K,这笔钱就没有了。
  2. 免费午餐:天下哪有免费午餐?湾区软件公司就有。 不仅午餐免费,早餐,晚餐,饮料,水果,零食等统统免费。有些甚至连周末也有。每顿饭的名义价值大概在$15~$20左右。如果三餐都在公司吃:$17.5*20*3 = $1,050/月。如果你自己不喜欢做饭,也不想出去下馆子,在公司吃饭可以省下不少钱。
  3. 医疗保险:之前视频中没有提到,美国医疗特别贵,所以保险也很贵,一年也要好几千块美元。
  4. 交通补贴:免费的班车,公共交通补贴,打车补贴等。

Part 2. 大厂横向比较

选取了Facebook, Microsoft, Apple, Google 和 Amazon等传统大厂来比较,也有收入比它们高的。这里只比较了base + bonus + stock。所有数据全部来自于 levels.fyi 网站。

首先每家公司对级别的要求/定义不太相同,我们先看一张天梯图:

Entry level: Apple ICT2/ICT3, Amazon: L4, Google L3, Facebook E3, Microsoft 59,60
Intermediate level: Apple ICT3, Amazon: L5, Google L4, Facebook E4, Microsoft 61,62
Senior level: Apple ICT4, Amazon L6, Google L5, Facebook E5, Microsoft 63,64

从这张图就可以明显的看到,绿色部分的base salary增加的不多,主要是蓝色的stock部分随着级别呈指数增长。同时我也给出了近5年该公司的股票走势。长期持有增长型公司的股票收入相当可观。

微软相对前面两家来说package就要低一些,主要是stock比较少。

亚麻和苹果作为两家完全不同类型的公司没想到在薪资方面倒是出奇的统一。

Part 3. 税务问题

最后我们来简单聊一下税务问题。首先是免费声明:花花无法为你提供任何税务方面的服务和建议,下面的所有内容仅供参考,不能作为你报税依据。

我们假设一年的总收入为$200,000,单身,位于加州。
首先是扣除部分:

  1. 401K pre-tax, $20,000
  2. Standard deduction $12,000

那么taxable income就是$168,000

我们来看一下2019年联邦税表

Image result for 2019 tax rate

收入超过$160,726的,需要交$32,748.50 + 32% * ($16,800 – $160,726) = $35,076. 综合税率:$35,076 / $168,000 = 20.88%

除了联邦税之外还有州税:

Picture

落在9.3%这一档,大概要交$14k,综合税率 8.33%。

你以为这样就完了吗?还要交社会保险6.2%,上限$8k+。医疗保险1.45%,上限$2k。

总的税收 = $35k + $14k + $8k + $2k ~= $60k

综合税率:$60k / $168k = 35.7%

税前$200k, 税后$108 + 20k = $128k,扣除401k和股票,到手的现金大概也就$90k/year,每个月$7,500,房租/水电网 $3000+,汽车+保险 $400+,还要吃饭,买衣服什么的,就没剩多少钱了。。。在哪里都不容易啊。所以有些人选择住房车/车库,骑车或坐班车,在公司吃饭,穿公司发的t-shirt。哦对了,如果你买了房,就算还清了贷款,每个月还要交$1500~$3000+的房产税,而且一交就是一辈子。

花花酱 LeetCode 84. Largest Rectangle in Histogram

Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.


Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].


The largest rectangle is shown in the shaded area, which has area = 10 unit.

Example:

Input: [2,1,5,6,2,3]
Output: 10

Solution 1: Monotonic Stack

Use a monotonic stack to maintain the higher bars’s indices in ascending order.
When encounter a lower bar, pop the tallest bar and use it as the bottleneck to compute the area.

Time complexity: O(n)
Space complexity: O(n)

C++

花花酱 LeetCode 1344. Angle Between Hands of a Clock

Given two numbers, hour and minutes. Return the smaller angle (in sexagesimal units) formed between the hour and the minute hand.

Example 1:

Input: hour = 12, minutes = 30
Output: 165

Example 2:

Input: hour = 3, minutes = 30
Output: 75

Example 3:

Input: hour = 3, minutes = 15
Output: 7.5

Example 4:

Input: hour = 4, minutes = 50
Output: 155

Example 5:

Input: hour = 12, minutes = 0
Output: 0

Constraints:

  • 1 <= hour <= 12
  • 0 <= minutes <= 59
  • Answers within 10^-5 of the actual value will be accepted as correct.

Solution: Math

  1. Compute the angle of the hour hand (h + m / 60.0) * 360 / 12 as a_h
  2. Compute the angle of the minute hand m / 60.0 * 360 as a_m
  3. ans = min(abs(a_h – a_m), 360 – abs(a_h – a_m))

Time complexity: O(1)
Space complexity: O(1)

C++

花花酱 LeetCode 1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold

Given an array of integers arr and two integers k and threshold.

Return the number of sub-arrays of size k and average greater than or equal to threshold.

Example 1:

Input: arr = [2,2,2,2,5,5,5,8], k = 3, threshold = 4
Output: 3
Explanation: Sub-arrays [2,5,5],[5,5,5] and [5,5,8] have averages 4, 5 and 6 respectively. All other sub-arrays of size 3 have averages less than 4 (the threshold).

Example 2:

Input: arr = [1,1,1,1,1], k = 1, threshold = 0
Output: 5

Example 3:

Input: arr = [11,13,17,23,29,31,7,5,2,3], k = 3, threshold = 5
Output: 6
Explanation: The first 6 sub-arrays of size 3 have averages greater than 5. Note that averages are not integers.

Example 4:

Input: arr = [7,7,7,7,7,7,7], k = 7, threshold = 7
Output: 1

Example 5:

Input: arr = [4,4,4,4], k = 4, threshold = 1
Output: 1

Constraints:

  • 1 <= arr.length <= 10^5
  • 1 <= arr[i] <= 10^4
  • 1 <= k <= arr.length
  • 0 <= threshold <= 10^4

Solution: Sliding Window

  1. Window size = k
  2. Maintain the sum of the window
  3. Check sum >= threshold * k

Time complexity: O(n)
Space complexity: O(1)

C++

花花酱 LeetCode 1342. Number of Steps to Reduce a Number to Zero

Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, otherwise, you have to subtract 1 from it.

Example 1:

Input: num = 14
Output: 6
Explanation: 
Step 1) 14 is even; divide by 2 and obtain 7. 
Step 2) 7 is odd; subtract 1 and obtain 6.
Step 3) 6 is even; divide by 2 and obtain 3. 
Step 4) 3 is odd; subtract 1 and obtain 2. 
Step 5) 2 is even; divide by 2 and obtain 1. 
Step 6) 1 is odd; subtract 1 and obtain 0.

Example 2:

Input: num = 8
Output: 4
Explanation: 
Step 1) 8 is even; divide by 2 and obtain 4. 
Step 2) 4 is even; divide by 2 and obtain 2. 
Step 3) 2 is even; divide by 2 and obtain 1. 
Step 4) 1 is odd; subtract 1 and obtain 0.

Example 3:

Input: num = 123
Output: 12

Constraints:

  • 0 <= num <= 10^6

Solution: Simulation

Time complexity: O(logn)
Space complexity: O(1)

C++