Affinity

Affinity is an in-game mechanic for experience points. Warframes, Sentinels and weapons are all capable of earning affinity. It is earned by killing enemies, assisting in kills, hacking, completing missions, picking up Affinity Orbs and completing challenges. Upon gaining enough affinity, equipment will rank up and gain one extra point of Mod capacity (two points when supercharged via an Orokin Catalyst or Orokin Reactor), used for applying mods. Note that despite being often described as "experience", this value is stored in the specific item itself and not the player's character/account; if said item is sold or used in crafting, all its associated affinity and ranks are lost.

Affinity does not directly affect a player's Mastery Rank. However, ranking up weapons, sentinels, and sentinel weapons raises a player's Mastery Rank by 100 points and ranking up a Warframe increases Mastery Rank by 200.

The amount of affinity a weapon or frame has earned during a mission can be seen in the post mission report, just to the left of the reward info box.

Affinity acquisition can be boosted by using the "Affinity Amp" consumable purchasable for 40 and will last 3 days or  80 for 7 days. Affinity Amp is also randomly rewarded from alerts.

Warframes
Affinity is granted to Warframes as their powers are used to kill enemies, to heal team mates, completing a challenge (see below), completing objectives, and picking up affinity orbs. This affinity will be granted regardless of the mission being played, even if the player does not make it to extraction. A Warframe's affinity can be seen as a blue bar next to the frame in the arsenal or during a mission as a white bar behind the name of the frame in the top right of the game screen, as well as the end game report. Affinity orbs are dropped as pickups from containers and lockers. The orbs grant 100 affinity to the warframe. The total amount of affinity gained will appear on the screen as 100 affinity.

Weapons
Affinity is given to each of the weapons as they are used to dispatch enemies, or assists (damaging an enemy that a teammate kills). The amount of affinity a weapon has can be seen at any time in the arsenal as a blue bar below the weapon. It can also be seen during missions for weapons that are currently in use as a white bar behind the name of the weapon in the lower right of the screen. There is currently no way to see the rank/affinity of a sentinel or melee weapon during a mission.

Ally's Kills
Enemy kills by nearby teammates will also grant affinity. This is to promote teams staying together. What ever slot the weapon kill is made from will grant the displayed amount of affinity to the weapon in that slot for every player, regardless of whether or not the player had used it. For example: a teammate kills an enemy with a Braton, every nearby player is given the affinity to their primary weapon regardless if it is a rifle or shotgun, and even if they were using sidearms at that point of time. All kills by nearby players also grant affinity to the warframes. Assisting in a kill will grant additional affinity to that of the nearby kill.

Bonus Objectives (Challenges)
In addition to the main objective of the mission selected, each player will also be assigned a random bonus objective or challenge to optionally complete. If the player successfully completes the bonus objective, an extra 500 affinity will be rewarded to that player's warframe.

Bonus Affinity
Affinity is rewarded at the end of missions based on the amount of affinity gained during a mission. It is only awarded if the player made it to extraction.

Bonus affinity shown as yellow in the end of mission report is the bonuses from completing objectives and challenges using the respective weapon or frame. It is often worth up to 50% of the base affinity earned during the game.

Affinity Needed to Level
The affinity needed for warframes and sentinels to increase by one level can be calculated with the formula: (Level)² × 1000

Similarly, the affinity needed for weapons is half that of warframes and sentinels: (Level)² × 500

The following is the calculated affinity needed for various equipment: