1. Home
  2. trading fees.

trading fees.

What is profit and loss (PnL) and how to calculate it

PnL refers to the financial gain or loss from buying and selling cryptocurrencies. To calculate it, use various method like the FIFO, LIFO, YTD, and more!

Anyone who has dealt with trading in traditional finance is likely to be aware of profit and loss (PnL). But is PnL in the cryptocurrency world the same? The ability to comprehend terms like mark-to-market (MTM), realized PnL and unrealized PnL will help develop a better understanding of the cryptocurrency a person holds.

Without a well-defined process to get insight into profit or loss, cryptocurrency trading may be overwhelming, and traders may struggle with what they are doing. PnL reflects the change in the value of a trader’s positions over a specific period. 

To gain a clearer understanding, let's examine it in the context of cryptocurrency trading.

Understanding the basics of PnL

PnL in crypto refers to the calculation of the profit or loss made on a cryptocurrency investment or trading position. It is a metric used to evaluate the financial performance of a trader or investor in the crypto market.

To begin, here are some key terms in PnL terminology:

MTM

MTM refers to the process of valuing an asset or financial instrument based on its current market price or fair value. For example, in the context of crypto trading, if an investor holds a certain amount of Bitcoin (BTC), the value of that Bitcoin will fluctuate based on the current market price.

The general formula for calculating PnL is:

Suppose the MTM price for Ether (ETH) today is $1,970, while the MTM price yesterday was $1,950. In this case, the PnL is $20. It indicates a profit of $20. On the contrary, if the MTM price of ETH was $1,980 yesterday, it indicates a loss of $10.

Future value

Future value indicates the value of a digital coin at a future point in time.

For example, if a trader stakes Tron (TRX) worth $1,000 with a 4% yearly reward, how much will the person get back after a year? The answer is $1,040. At the time of staking, the present value will be $1,000, while the future value will be $1,040.

There will be a present value at the point when the trader stakes, but if the person considers the future as a whole, there could be countless future values.

There is a different way to use future value as well. Traders could ask how much to stake to get $1,040 in a year. If they know the present and future values, they could calculate the discount factor. The formula for calculating the discount factor is:

For the example given above, the discount factor will be:

Realized PnL

Realized PnL is calculated after traders have closed their position (sold the cryptocurrency they hold). Only the executed price of the orders is taken into account in realized PnL, and it has no direct relation to the mark price.

The mark price is the price at which a derivatives contract is valued based on the current market price of the underlying asset rather than the price at which the contract is being traded.

The formula for realized PnL is:

An example will help understand how to calculate realized PnL. If the entry price for buying X number of Polkadot (DOT) is $70 and the exit price is $105, the PnL for the period is $35, which refers to a profit of $35. However, if the closing price of the trade was $55, the PnL will be $15, but it will reflect a loss.

Unrealized PnL

Unrealized PnL refers to the profit or loss that is currently held in open positions but has not yet been realized through closing the position. The formula for determining unrealized PnL is:

Donald has purchased ETH contracts with an average entry price of $1,900. The mark price of ETH is currently $1,600. The unrealized PnL for Donald is the difference between the average entry price and the mark price.

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

How to do PnL calculation

To determine PnL in cryptocurrency, a trader needs to find the difference between the initial cost of acquiring a digital coin and the current market value of the same coin. Various methods to calculate PnL in cryptocurrency are as follows:

First-in, first-out (FIFO) method

The FIFO method requires the seller to use the price of the asset from when it was first bought. Here is the process to calculate PnL using the FIFO method:

1) To settle on the initial cost of the cryptocurrency, multiply the purchase price per unit by the number of units sold.

2) To determine the current market value of the asset disposed of, multiply the current market price per unit by the number of units sold.

3) To find the PnL, deduct the initial cost from the current market value.

Suppose Bob first bought 1 ETH at $1,100 and a few days later bought 1 ETH at $800. A year later, he sold 1 ETH at $1,200. As he had first bought ETH at $1,100, this price will be considered the initial cost. Applying the FIFO method, Bob could calculate PnL as follows:

Bob's initial cost = (1 ETH x $1,100) = $1,100

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

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

Last-in, first-out (LIFO) method

The LIFO method requires the seller to use the most recent purchase price of an asset in the calculation. The other aspects are just like the FIFO method. Here is the PnL using the LIFO method using the same example as above:

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

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

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

Weighted average cost method

The weighted average cost method requires traders to determine the average cost of all units of a digital currency in their portfolio to arrive at the initial cost. Here are the steps to calculate PnL using this method:

1) Determine the total cost of all units of the cryptocurrency. Multiply the purchase price per unit for each transaction by the number of units of the asset and add the numbers.

2) To arrive at the weighted average cost per unit of the digital coin, divide the total cost of all units by the number of units.

3) Find the current market value of the cryptocurrency sold. Multiply the current market price per unit by the number of units sold.

4) To determine PnL, subtract the average cost per unit from the current market value.

Suppose Alice bought 1 BTC at $1,500 and a few days later bought 1 BTC at $2,000. She later sold 1 BTC at $2,400. Here is the PnL using the weighted average cost method:

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

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

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

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

Profits/losses from opening and closing positions

Analyzing open and closed positions at regular intervals is an efficient way to monitor performance. An initial purchase a person makes in the market is an open position, while selling the cryptocurrency is termed closing the position. If a trader buys 10 DOT, it is an open position. When the trader sells those DOT, the position gets closed.

For example, if a trader bought 10 DOT for $70 and sold them for $100, the person’s PnL would be $30 ($100 - $70). Regular analysis of trades in line with open and closed positions helps a person trade in an organized manner.

Year-to-date (YTD) calculation

YTD is a way to measure the performance of investments made in cryptocurrency from the start of the year to the current date. Investors who regularly buy and hold cryptocurrencies for years can know their unrealized profits with a YTD calculation. The trader just needs to calculate the value of the portfolio at the beginning and end of a year and compare these values. This could be a calendar year or fiscal year, depending on the person’s preference or requirements.

Suppose someone holds $1,000 worth of Cardano (ADA) on Jan. 1, 2022 and $1,600 of ADA on Jan. 1, 2023. In this case, $600 is the unrealized profit. Unrealized profit denotes returns that haven’t yet been converted into cash or cash equivalents such as term deposits.

Transaction-based calculation

A transaction-based calculation requires a person to calculate the PnL for each specific transaction. For instance, if a person bought 1 ETH for $1,000 and sold it for $1,500, the PnL for the transaction would be $500 profit ($1,500 - $1,000). If the number of transactions is small and a trader needs to calculate PnL for these transactions separately, a transaction-based calculation is an ideal method.

Percentage profit

The percentage profit method reflects the PnL as a percentage of the initial cost. An example will help understand better. Suppose a trader buys 1 Binance Coin (BNB) for $300 and sells it for $390. In this case, the person’s PnL would be $90 profit ($390 - $300). To arrive at the percentage profit, the trader needs to divide the PnL by the purchase price and multiply the amount by 100 (($90 / $300) x 100). This amounts to 30%.

However, please note that these are simplified examples that do not factor in variables such as taxes, trading fees paid to the platform, market volatility, etc. In real-life situations, a trader will need to take into account the specific context when calculating PnL.

How to calculate PnL of perpetual contracts

Perpetual contracts are a type of futures contract with no fixed settlement time or expiration date. Traders can hold their long or short positions indefinitely, provided they have sufficient maintenance margin, which is the minimal amount of collateral needed for maintaining open trading positions.

When traders calculate the PnL of perpetual contracts in cryptocurrencies, they need to calculate both realized and unrealized PnL and then add them to determine the total PnL.

Here are the steps to measure PnL of perpetual contracts:

Again, this is a simplified way to explain the concept of calculating PnL for crypto perpetual contracts. When calculating total PnL in real life, a trader needs to take into account factors like trading fees and funding rates.

PnL calculations and associated tools

Understanding crypto PnL helps people know if their cryptocurrency portfolio is in profit or in loss. Gaining an insight into key parameters like cost basis, quantity, price of each trade and profitability of the portfolio helps traders assess the efficiency of their strategies and make necessary adjustments. Precise knowledge of the funds they have made or lost on a particular trade influences their upcoming trading decisions for the better.

Apart from PnL calculations, there are tools like specialized spreadsheets and automated trading bots that could help traders analyze their performances and zero in on profitable trading opportunities, regardless of their experience.

History Suggesting Bitcoin (BTC) Should Hold Current Levels, According to Analyst – Here’s Why

Pancakeswap Launches Version 3 of Protocol on BNB and Ethereum Blockchains

Pancakeswap Launches Version 3 of Protocol on BNB and Ethereum BlockchainsOn Monday, April 3, the decentralized exchange (dex) platform Pancakeswap launched version 3 of its protocol (v3) on the Binance Coin (bnb) and Ethereum blockchains. The new application aims to improve the performance of the dex protocol and reduce fees by implementing four levels of trading fees. New Features and Improved Capital Efficiency Offered in […]

History Suggesting Bitcoin (BTC) Should Hold Current Levels, According to Analyst – Here’s Why

Decentralized Exchange Pancakeswap to Launch Version 3 Iteration in April

Decentralized Exchange Pancakeswap to Launch Version 3 Iteration in AprilOn March 4, the decentralized exchange Pancakeswap announced that the team plans to launch its version three (v3) iteration of the platform during the first week of April 2023. Pancakeswap v3 will provide new features and improve liquidity alongside enhancements in interface accessibility and the decentralized exchange (dex) platform’s yield farming experience. Pancakeswap Announces Version […]

History Suggesting Bitcoin (BTC) Should Hold Current Levels, According to Analyst – Here’s Why

Coinbase eyes long-term growth of subscription revenue, NFTs still a focus

Coinbase CEO Brian Armstrong says the exchange has been building subscription revenue streams for three years and will continue to do so into the long term.

American cryptocurrency exchange Coinbase aims to grow revenue from subscriptions in the long term to combat potential profit margin compression.

The firm’s founder and CEO Brian Armstrong delved into the long-term prospects of the American cryptocurrency exchange in a wide-ranging interview with CNBC’s Crypto World on Aug. 23. A key talking point was the potential of lower revenues from fees in the future and how the company plans to preempt this possibility.

Armstrong highlighted his belief that profit margin compression was bound to occur in the future as more exchanges and competitors launch similar products and services which could compete for market share:

“This is why we’re investing today in so much subscription and services revenue and we’re realizing that trading fees will still be a major part of our business in 10 or 20 years from now. But I’d like to get to a place where more than 50% of our revenue is from subscriptions and services.”

Armstrong said that the company had been focused on this shift for the past three years which has resulted in subscriptions and services accounting for 18% of the company’s revenue stream. This was up from the 4% contribution to revenue in 2020, according to Armstrong.

The Coinbase CEO noted that its staking offerings and USDC custody services were primary drivers of subscription and services revenue, while the development of Coinbase Cloud and other projects in the pipeline would further add to the growth of these revenue streams.

Related: Coinbase introduces wrapped staked ETH asset ahead of the Merge

The growth of Coinbase’s staking product is also dependent on the scalability of the underlying blockchains powering the service, with Ethereum’s upcoming transition to a proof-of-stake consensus algorithm poised to address this issue as Armstrong explained.

The burgeoning nonfungible token (NFT) space and Coinbase’s proprietary NFT marketplace was also a topic of discussion. Having launched a beta release of its NFT marketplace in April 2022, the CEO said that the company is still committed to NFTs and believes it will be a big business:

“It’s still super early in the NFT space. We saw a big run-up last year with people trading Bored Apes and all sorts of different things that got traction. But I think that’s just the first step in a long journey of what NFTs are going to become.”

Armstrong highlighted his belief that NFTs will change how people use social media, how the music industry operates and how creative talent interacts with audiences. Natively integrating Coinbase NFTs into various platforms people use daily was another avenue that Armstrong explored.

“We’re in the process of aggregating all the different places that people can bid and ask on NFTs in one place. If we can aggregate that there is really no downside to using it there instead of going anywhere else.”

The exchange is currently trialing a beta version for its Coinbase One subscription product that gives members access to zero-fee trading, $1 million account protection and automated tax services. The monthly subscription to the service is $29.99.

History Suggesting Bitcoin (BTC) Should Hold Current Levels, According to Analyst – Here’s Why