Skip to main content

What is Average Cost in Hapi?

Updated yesterday

The Average Cost is the average price per share of your currently open positions. This value is used to calculate the unrealized gain or loss on your investments.

It's important to understand that this calculation only takes into account the shares you've bought and isn't affected by partial sales. The average cost will reset only when you completely sell all shares of a specific position, bringing the calculation back to zero.

How is Average Cost calculated in Hapi?

Average cost calculation in Hapi is based solely on buy orders, using a weighted average of the price paid per share acquired.

Example:

Date

Activity

Quantity

Price per share

Total amount

Average Cost

June 1

Buy

3

$100

$300

$100

June 10

Buy

2

$110

$220

$104

June 15

Partial Sale

-2

$120

$240

$104 (no change)

June 20

Buy

1

$105

$105

$104.17

June 25

Full Sale

-4

$115

$460

$104.17 → $0

  • When making additional purchases, the average cost updates according to the weighted prices.

  • Partial sales do not affect your current average cost.

  • Once you sell all shares, the average cost resets to zero.

Total Return

Total return represents your unrealized gain or loss up to the current moment, calculated using the following formula:

Total return=(Market value−Average cost)×Total assets

For example, in this screen:

  • Market value: $592.92

  • Average cost: $526.57

  • Total assets: 1.01105

The total return would be:

(592.92−526.57)×1.01105=60.54

This means you currently have an unrealized gain of $60.54, equivalent to 11.37%.

Important considerations

  • The average cost is used as a reference for your unrealized gains or losses, not for realized gains or losses.

  • The calculation does not include commissions or costs related to corporate actions (like stock splits).

If you have additional questions, please reach out to our support team! We’re here to help.

Did this answer your question?