Numerical Example: $25k convertible note with $5M cap, 20% discount
Let’s do numerical example ignoring any accrued interest:

You invest $25k in a startup’s seed round using a convertible note with a $5M cap, 20% discount

If, at the Series A, the startup raises money from a venture capital firm that invests at a premoney valuation of $10M with a per share price of $5.00 IF we apply the discount, the price per share would be $4.00/share ($5.00 times (1 minus 20%)) IF we apply the cap, the price per share would be $2.50/share ($5.00 times ($5M cap divided by $10M premoney valuation)) THUS the cap would apply and the note would convert at $2.50/share which gives 10,000 shares of Series A Preferred Stock ($25,000 divided by $2.50/share). On paper, your 10,000 shares at $5.00/share are worth $50,000 which is an unrealized return of 100%.

If, at the Series A, the startup raises money from a venture capital firm that invests at a premoney valuation of $6M with a per share price of $5.00 IF we apply the discount, the price per share would be $4.00/share ($5.00 times (1 minus 20%)) IF we apply the cap, the price per share would be $4.1667/share ($5.00 times ($5M cap divided by $6M premoney valuation)) THUS the discount would apply and the note would convert at $4.00/share which gives 6,250 shares of Series A Preferred Stock ($25,000 divided by $4.00/share). On paper, your 6,250 shares at $5.00/share are worth $31,250 which is an unrealized return of 25%