What this calculator does
Calculate bid-ask spread, midpoint, spread percentage, and trade values for a quoted security.
How it works
The calculator evaluates spread = ask − bid; spread % = spread ÷ midpoint × 100%. Inputs are checked before calculation, and invalid values such as zero denominators or out-of-range selections produce a clear error instead of a misleading result.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
3-
?bidPrice=Bid priceMoney · Required · Default: 99.5
-
?askPrice=Ask priceMoney · Required · Default: 100.1
-
?quantity=QuantityNumber · Required · Default: 100
Outputs
6-
spreadBid-ask spreadCurrency · Primary output
-
spreadPercentMidpointSpread as % of midpointPercentage
-
midpointQuote midpointCurrency
-
buyValueCost to buy at askCurrency
-
sellValueProceeds to sell at bidCurrency
-
roundTripSpreadCostImmediate spread costCurrency
Inputs and results
The inputs are Bid price, Ask price, Quantity. Results include Bid-ask spread, Spread as % of midpoint, Quote midpoint, Cost to buy at ask, Proceeds to sell at bid, Immediate spread cost.
Important notes
Market quotes can change rapidly. This calculator does not provide investment advice or executable pricing.