What is profit and loss (PnL) and how do you calculate it

2026-01-06 08:35:38
Crypto Trading
Crypto Tutorial
Futures Trading
Spot Trading
Trading Bots
Article Rating : 5
10 ratings
Find out what PnL means and how to calculate it on Gate! Explore essential profit and loss formulas for cryptocurrencies, including FIFO, LIFO, weighted average cost, and the difference between realized and unrealized PnL. This comprehensive guide is tailored for beginner traders.
What is profit and loss (PnL) and how do you calculate it

Understanding the Fundamentals of PnL

In crypto, PnL refers to the calculation of profit or loss from a cryptocurrency investment or trading position. This core metric is essential for assessing a trader’s or investor’s financial performance in the crypto market. While anyone familiar with traditional finance understands profit and loss (PnL), the crypto world introduces unique considerations that demand special attention.

Grasping concepts like Mark-to-Market (MTM), Realized PnL, and Unrealized PnL will deepen your understanding of the cryptocurrencies you hold. Without a clear framework for tracking profits and losses, crypto trading can become overwhelming and leave traders uncertain about their actions. PnL directly reflects changes in a trader’s position values over a specific period.

Mark-to-Market (MTM)

Mark-to-Market (MTM) is the process of valuing an asset or financial instrument at its current market price or fair value. For example, in crypto trading, if you hold Bitcoin (BTC), its value will fluctuate in real time based on the prevailing market price.

To calculate PnL, subtract the previous price from the current market price. For instance, if Ether (ETH) has an MTM price of $1,970 today and $1,950 yesterday, your PnL is $20, signifying a $20 gain. Conversely, if ETH’s MTM price was $1,980 yesterday, you record a $10 loss.

Future Value

Future value measures what a digital currency will be worth at a future date—an important concept for understanding investment growth potential. Suppose you stake Tron (TRX) worth $1,000 at an annual yield of 4%. After one year, you’ll receive $1,040. At the time of staking, the present value is $1,000; after a year, the future value is $1,040.

You’ll have a present value at the time of staking, but over time, there can be multiple future values. Alternatively, you might ask: How much do I need to stake today to receive $1,040 in a year? With both present and future values known, you can compute the discount factor.

Realized PnL

Realized PnL is calculated after a trader closes a position by selling their cryptocurrency. Only the executed order price is used—reference prices are not considered in realized PnL.

The reference price is the value at which a derivatives contract is evaluated, based on the current market price of the underlying asset rather than the contract’s own trading price. Consider this example: if you buy X amount of Polkadot (DOT) at $70 and sell at $105, your PnL for that period is $35, representing a $35 profit. If you close the trade at $55, your PnL is $15, but this time it’s a loss.

Unrealized PnL

Unrealized PnL is the profit or loss currently held in open positions that hasn’t been realized by closing the trade. This concept is critical for traders with active positions who need to monitor their potential gains or losses.

For example, Donald buys ETH contracts at an average entry price of $1,900. The current reference price is $1,600. Donald’s unrealized PnL is the difference between his entry price and the current reference price:

Unrealized profit = $1,900 - $1,600 = $300

How to Calculate PnL

To calculate PnL in crypto, find the difference between your initial acquisition cost and the current market value of your digital asset. There are several PnL calculation methods, each with specific applications and benefits.

First-In, First-Out (FIFO) Method

The FIFO method requires you to calculate PnL using the purchase price of the earliest-acquired asset. It’s one of the most common methods for PnL calculation. Here’s how it works:

  1. Calculate your initial cost by multiplying the unit purchase price by the number of units sold.
  2. Calculate the current market value by multiplying the current unit price by the number of units sold.
  3. Subtract your initial cost from the current market value to find PnL.

Suppose Bob buys 1 ETH at $1,100, then another at $800 a few days later. After a year, he sells 1 ETH for $1,200. Because Bob’s first ETH cost $1,100, that’s his initial cost. Using FIFO, Bob’s PnL is:

Bob’s initial cost = (1 ETH × $1,100) = $1,100

Current market value = (1 ETH × $1,200) = $1,200

Profit = $1,200 - $1,100 = $100 (profit)

Last-In, First-Out (LIFO) Method

The LIFO method calculates PnL based on the most recently purchased asset’s price. This approach is especially useful in volatile markets where price swings are rapid. Using the earlier example:

Bob’s initial cost = (1 ETH × $800) = $800

Current market value = (1 ETH × $1,200) = $1,200

Profit = $1,200 - $800 = $400 (profit)

Weighted Average Cost Method

With the weighted average cost method, traders determine the average cost of all digital asset units in their portfolio. This method is ideal for traders who accumulate assets at varying prices. To calculate PnL:

  1. Add up the total cost by multiplying each purchase price by the number of units acquired and summing the results.
  2. Divide the total cost by the total number of units to get the weighted average cost per unit.
  3. To find the market value, multiply the current unit price by the number of units sold.
  4. Subtract the average cost per unit from the market value to determine PnL.

For example, Alice buys 1 BTC at $1,500, then another at $2,000. She later sells 1 BTC for $2,400. Her PnL is calculated as follows:

Total cost = (1 BTC × $1,500) + (1 BTC × $2,000) = $3,500

Weighted average cost = $3,500 ÷ 2 BTC = $1,750

Current market value = (1 BTC × $2,400) = $2,400

Profit = $2,400 - $1,750 = $650 (profit)

PnL from Opening and Closing Positions

Routinely analyzing open and closed positions is essential for tracking trading strategy performance. An initial market purchase is considered an open position, while selling the asset closes the position. For example, if you buy 10 DOT, that’s an open position; selling those 10 DOT closes it.

Suppose you buy 10 DOT for $70 and sell them for $100. Your PnL is $30 ($100 - $70). Regular analysis by position status helps you trade systematically and spot patterns in your strategies.

Year-to-Date Calculation

Year-to-date (YTD) measures crypto investment performance from the year’s start up to today. Investors who regularly buy and hold crypto can track unrealized profits using YTD calculations. Simply compare your portfolio value at the beginning and end of the year—this can be a calendar or fiscal year, depending on your needs.

For example, if you hold $1,000 in Cardano (ADA) on January 1, 2022, and $1,600 on January 1, 2023, your unrealized profit is $600. Unrealized profit refers to gains not yet converted to cash or equivalents like time deposits.

Transaction-Based Calculation

Transaction-based calculation means determining PnL for each specific trade. This approach is best for traders seeking a granular view of every transaction. For example, if you buy 1 ETH at $1,000 and sell at $1,500, your PnL for that trade is $500 ($1,500 - $1,000). This method is ideal if you have a small number of transactions and need to analyze each one individually.

Percentage Profit

The percentage profit method expresses PnL as a percentage of initial cost, providing a proportional measure of return. For example, if you buy a high-value crypto for $300 and sell for $390, your PnL is $90 ($390 - $300). To find the percentage profit, divide the PnL by the purchase price and multiply by 100: ($90 ÷ $300) × 100 = 30%.

Keep in mind, these are simplified examples that don’t account for variables like taxes, trading fees, or market volatility. In real practice, traders must consider specific context when calculating PnL.

How to Calculate PnL for Perpetual Contracts

Perpetual contracts are a type of futures contract with no settlement period or fixed expiration date. They’re a major innovation in the crypto market, enabling traders to maintain long or short positions indefinitely—so long as they meet maintenance margin requirements (the minimum collateral needed to keep trades open).

To calculate PnL for perpetual contracts, traders must sum both realized and unrealized PnL. This process is more complex than standard spot trading because it involves additional considerations like margin and funding rates.

PnL Calculations and Associated Tools

Understanding crypto PnL is vital for knowing if your portfolio is generating profits or losses. Accurately tracking key metrics like cost basis, quantity, trade price, and portfolio returns allows traders to evaluate strategy effectiveness and make timely adjustments. Knowing exactly how much you’ve gained or lost on a trade can directly influence your next decisions.

Beyond manual calculations, tools such as specialized spreadsheets and automated trading bots can help you analyze performance and focus on profitable opportunities—regardless of your experience level. These resources enable ongoing PnL monitoring, help identify patterns and trends, and support the continuous improvement of your crypto investment strategies.

FAQ

What is PnL (Profit and Loss) and why is it important to track?

PnL tracks your trading gains and losses. Monitoring it is essential for evaluating your performance, identifying effective strategies, and making informed financial decisions in crypto markets.

What is the basic formula for calculating profit and loss?

The basic formula: Selling Price - Purchase Price = Profit or Loss. If positive, you have a profit; if negative, you have a loss.

How do you calculate PnL in trading and investing?

PnL = (Selling Price - Purchase Price) × Asset Quantity. For futures, multiply by tick value and number of contracts. A positive result means profit; a negative result means loss.

What’s the difference between realized and unrealized PnL?

Realized PnL reflects profits or losses settled when you close a position. Unrealized PnL shows gains or losses on still-open positions. Realized PnL is actual, while unrealized is theoretical.

How do you interpret PnL in a company’s financial statements?

PnL shows net profit or loss for a period after all revenues and expenses. It’s the key metric for assessing a company’s financial performance and real profitability for that period.

What are the best tools and platforms for monitoring PnL in real time?

Top platforms for real-time PnL monitoring include Bloomberg Terminal, Reuters Eikon, and Tradebook. These offer comprehensive market data, advanced analytics, and instant updates on both realized and unrealized profits.

How do you manage risk with PnL analysis?

Monitor unrealized PnL to spot potential losses early. Adjust positions, set stop-loss limits, and review your performance regularly. Use these insights to optimize strategies and safeguard your capital.

* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.
Related Articles
How to Withdraw Money from Crypto Exchanges in 2025: A Beginner's Guide

How to Withdraw Money from Crypto Exchanges in 2025: A Beginner's Guide

Navigating the crypto exchange withdrawal process in 2025 can be daunting. This guide demystifies how to withdraw money from exchanges, exploring secure cryptocurrency withdrawal methods, comparing fees, and offering the fastest ways to access your funds. We'll tackle common issues and provide expert tips for a smooth experience in today's evolving crypto landscape.
2025-08-14 05:17:58
Hedera Hashgraph (HBAR): Founders, Technology, and Price Outlook to 2030

Hedera Hashgraph (HBAR): Founders, Technology, and Price Outlook to 2030

Hedera Hashgraph (HBAR) is a next-generation distributed ledger platform known for its unique Hashgraph consensus and enterprise-grade governance. Backed by leading global corporations, it aims to power fast, secure, and energy-efficient decentralized applications.
2025-08-14 05:17:24
Jasmy Coin: A Japanese Crypto Tale of Ambition, Hype, and Hope

Jasmy Coin: A Japanese Crypto Tale of Ambition, Hype, and Hope

Jasmy Coin, once hailed as “Japan’s Bitcoin,” is staging a quiet comeback after a dramatic fall from grace. This deep dive unpacks its Sony-born origins, wild market swings, and whether 2025 could mark its true revival.
2025-08-14 05:10:33
IOTA (MIOTA) – From Tangle Origins to 2025 Price Outlook

IOTA (MIOTA) – From Tangle Origins to 2025 Price Outlook

IOTA is an innovative crypto project designed for the Internet of Things (IoT), using a unique Tangle architecture to enable feeless, miner-free transactions. With recent upgrades and the upcoming IOTA 2.0, it is moving toward full decentralization and broader real-world applications.
2025-08-14 05:11:15
Bitcoin Price in 2025: Analysis and Market Trends

Bitcoin Price in 2025: Analysis and Market Trends

As Bitcoin's price soars to **$94,296.02** in April 2025, the cryptocurrency market trends reflect a seismic shift in the financial landscape. This Bitcoin price forecast 2025 underscores the growing impact of blockchain technology on Bitcoin's trajectory. Savvy investors are refining their Bitcoin investment strategies, recognizing the pivotal role of Web3 in shaping Bitcoin's future. Discover how these forces are revolutionizing the digital economy and what it means for your portfolio.
2025-08-14 05:20:30
How to Trade Bitcoin in 2025: A Beginner's Guide

How to Trade Bitcoin in 2025: A Beginner's Guide

As we navigate the dynamic Bitcoin market in 2025, mastering effective trading strategies is crucial. From understanding the best Bitcoin trading strategies to analyzing cryptocurrency trading platforms, this comprehensive guide will equip both beginners and seasoned investors with the tools to thrive in today's digital economy.
2025-08-14 05:15:07
Recommended for You
Gate Ventures Insights: DeFi 2.0—Curator Strategy Layers Rise as RWA Emerges as a New Foundational Asset

Gate Ventures Insights: DeFi 2.0—Curator Strategy Layers Rise as RWA Emerges as a New Foundational Asset

Gain access to proprietary analysis, investment theses, and deep dives into the projects shaping the future of digital assets, featuring the latest frontier technology analysis and ecosystem developments.
2026-03-18 11:44:58
Gate Ventures Weekly Crypto Recap (March 16, 2026)

Gate Ventures Weekly Crypto Recap (March 16, 2026)

Stay ahead of the market with our Weekly Crypto Report, covering macro trends, a full crypto markets overview, and the key crypto highlights.
2026-03-16 13:34:19
Gate Ventures Weekly Crypto Recap (March 9, 2026)

Gate Ventures Weekly Crypto Recap (March 9, 2026)

Stay ahead of the market with our Weekly Crypto Report, covering macro trends, a full crypto markets overview, and the key crypto highlights.
2026-03-09 16:14:07
Gate Ventures Weekly Crypto Recap (March 2, 2026)

Gate Ventures Weekly Crypto Recap (March 2, 2026)

Stay ahead of the market with our Weekly Crypto Report, covering macro trends, a full crypto markets overview, and the key crypto highlights.
2026-03-02 23:20:41
Gate Ventures Weekly Crypto Recap (February 23, 2026)

Gate Ventures Weekly Crypto Recap (February 23, 2026)

Stay ahead of the market with our Weekly Crypto Report, covering macro trends, a full crypto markets overview, and the key crypto highlights.
2026-02-24 06:42:31
Gate Ventures Weekly Crypto Recap (February 9, 2026)

Gate Ventures Weekly Crypto Recap (February 9, 2026)

Stay ahead of the market with our Weekly Crypto Report, covering macro trends, a full crypto markets overview, and the key crypto highlights.
2026-02-09 20:15:46