Short answer

Subtract the bid from the ask, then divide by their midpoint and multiply by 100. Use quotes from the same time and market context, and record their displayed size.

Use the quote that actually applies to the order

The spread is the gap between quoted prices, not a guaranteed execution cost. A larger order can trade across multiple prices, while some executions can occur inside the spread. Keep spread, realized fill and broker fees as separate measurements. For volatile or thinly traded stocks, record the quote immediately before the order and distinguish regular from extended hours.

Worked example or comparison
Basis Evidence or calculation
Worked example or comparison Hypothetical bid $49.90 and ask $50.10. Spread is $0.20, midpoint $50.00 and relative spread 0.40%.

Frequently asked question

What is the best reference for the spread percentage denominator?

The quote midpoint is a common denominator. Name it explicitly so the result can be reproduced.

Source

Primary reference · investor.gov

Related guide

Reading Stock Quotes and Price History — Timestamps, Sessions, Adjustments and Data Gaps