Expected Move Calculator — Free Trading Calculator (Download, Runs in Your Browser)
- 30-expected-move-calculator/index.html — the calculator page — open this in a browser
- 30-expected-move-calculator/ui.mjs — the interface logic
- options-calculators/options.mjs — the calculation engine (options)
- shared/style.css — the styles
- README-FIRST.md — what it does and how to run it
- FREE-LICENSE.md — the free-edition license terms
About this product
Expected Move Calculator is a free trading calculator by Script Master Labs. It calculates the one-standard-deviation expected move from implied volatility, cross-checked against the straddle. It runs entirely in your browser — no server, no account, and nothing you type leaves your device — and its complete source is printed in full on this page and in the free download. No payment, no account, no subscription.
What it computes, in its own terms: the one-standard-deviation expected move two ways. From implied volatility: expected move = price × IV × √(days ÷ 365), shown in dollars and as a price range — under the model's assumptions the underlying finishes inside a one-standard-deviation range roughly 68% of the time. As a cross-check, 85% of the at-the-money straddle price, the market convention (the straddle itself prices a slightly wider move).
How to use it
Claim the free download, unzip it, and open the index.html inside the calculator's folder in any modern browser — it runs entirely on your device, with no install, no server and no account. The full source of every file is printed on this page below, and the free download carries the same working files with a README and the free-edition license.
Free edition vs paid edition
The download is the complete calculator — the same working files sold in the paid edition (https://dual.scriptmasterlabs.com/product/expected-move-calculator, $19 one-time). The paid edition adds the full written user guide, the evidence receipt, and the licensing and security reviews. Nothing in the calculator is held back from the free edition.
More free tools — free Pine Script v6 indicators and strategies, free trading calculators and a free x402 pre-payment trust check — are collected on the Free Tools hub. Educational software, not financial advice: it computes stated formulas from your inputs; it does not predict price and shows no win rate.
The complete calculator source — free, on this page
Expected Move Calculator is a free trading calculator by Script Master Labs. It calculates the one-standard-deviation expected move from implied volatility, cross-checked against the straddle. It runs entirely in your browser — no server, no account, and nothing you type leaves your device — and its complete source is printed in full on this page and in the free download. No payment, no account, no subscription.
===== file: 30-expected-move-calculator/index.html =====
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="robots" content="noindex"><title>Expected Move Calculator | SML</title><meta name="description" content="Calculate the one-standard-deviation expected move from implied volatility, and cross-check it against 85% of the at-the-money straddle price."><link rel="stylesheet" href="../shared/style.css"></head><body><main><h1>Expected Move Calculator</h1><p>Calculate the one-standard-deviation expected move from implied volatility, and cross-check it against 85% of the at-the-money straddle price.</p><form id="calc"><section class="inputs"><label>Underlying price ($)<input name="spot" type="number" step="any" required></label><label>Implied volatility (%) — e.g. 20 for 20%<input name="volatilityPercent" type="number" step="any" required></label><label>Days until the event / expiry<input name="days" type="number" step="any" required></label><label>ATM straddle price ($) — optional cross-check<input name="straddlePrice" type="number" step="any"></label></section><button>Calculate</button></form><p id="error" role="alert"></p><section id="results" hidden><h2>Results</h2><div id="metrics"></div><button id="export">Export JSON</button></section><section><h2>How this is calculated</h2><p>The implied-volatility method is the one-standard-deviation move of the Black-Scholes model: expected move = price × IV × √(days ÷ 365). The range shown is the price plus and minus that move — under the model's assumptions the underlying finishes inside a one-standard-deviation range roughly 68% of the time. The straddle cross-check uses the market convention that the expected move is about 85% of the at-the-money straddle price (the straddle itself prices a slightly wider move).</p><p>Limitations: both methods describe the move the options market is pricing, not a forecast of what will happen — realised moves are smaller than the expected move most of the time and far larger on genuine surprises. The IV method assumes volatility stays constant and returns are log-normally distributed; it uses calendar days (365), not trading days. This calculator is not financial advice.</p></section></main><script type="module" src="ui.mjs"></script></body></html>
===== file: 30-expected-move-calculator/ui.mjs =====
import {expectedMove} from '../options-calculators/options.mjs';const form=document.querySelector('#calc'),results=document.querySelector('#results'),metrics=document.querySelector('#metrics'),error=document.querySelector('#error');let last=null;form.addEventListener('input',()=>{last=null;results.hidden=true;error.textContent=''});form.addEventListener('submit',e=>{e.preventDefault();last=null;results.hidden=true;error.textContent='';try{const inputs=Object.fromEntries([...new FormData(form)].map(([k,v])=>[k,k==='straddlePrice'?(v===''?null:Number(v)):Number(v)]));const output=expectedMove(inputs);metrics.replaceChildren();for(const [k,v] of Object.entries(output)){const d=document.createElement('div');d.className='metric';d.textContent=k.replace(/([A-Z])/g,' $1');const s=document.createElement('strong');s.textContent=v===null?'Undefined':typeof v==='number'?v.toLocaleString('en-US',{maximumFractionDigits:4}):String(v);d.append(s);metrics.append(d)}last={inputs,output};results.hidden=false}catch(e){error.textContent=e.message}});document.querySelector('#export').onclick=()=>{if(!last)return;const url=URL.createObjectURL(new Blob([JSON.stringify(last,null,2)],{type:'application/json'}));const a=document.createElement('a');a.href=url;a.download='30-expected-move-calculator.json';a.click();URL.revokeObjectURL(url)};
===== file: options-calculators/options.mjs =====
// Shared original calculation engine for the Batch-3 options calculators
// (products 30, 31, 40). The pricing model is the published Black-Scholes-Merton
// model (1973); the normal CDF uses the Abramowitz & Stegun 26.2.17 polynomial
// approximation, the same published numerical method used by product 27's
// engine, and the two implementations are cross-checked against each other in
// options.test.mjs. Fixtures are mathematical, not market observations.
function cdf(x){const t=1/(1+0.2316419*Math.abs(x));const p=Math.exp(-x*x/2)/Math.sqrt(2*Math.PI)*t*(0.319381530+t*(-0.356563782+t*(1.781477937+t*(-1.821255978+t*1.330274429))));return x>=0?1-p:p;}
function pdf(x){return Math.exp(-x*x/2)/Math.sqrt(2*Math.PI);}
export function blackScholes({spot:S,strike:K,years:T,volatility:v,rate:r=0,dividend:q=0,type}){
if(![S,K,T,v,r,q].every(Number.isFinite)||S<=0||K<=0||T<=0||v<=0||!['call','put'].includes(type))throw new RangeError('Positive spot, strike, time and volatility required');
const a=Math.exp(-q*T),b=Math.exp(-r*T),d1=(Math.log(S/K)+(r-q+v*v/2)*T)/(v*Math.sqrt(T)),d2=d1-v*Math.sqrt(T),n=pdf(d1),call=type==='call';
const price=call?S*a*cdf(d1)-K*b*cdf(d2):K*b*cdf(-d2)-S*a*cdf(-d1);
const delta=a*(call?cdf(d1):cdf(d1)-1),gamma=a*n/(S*v*Math.sqrt(T)),vega=S*a*n*Math.sqrt(T)/100;
const theta=(-S*a*n*v/(2*Math.sqrt(T))+(call?q*S*a*cdf(d1)-r*K*b*cdf(d2):r*K*b*cdf(-d2)-q*S*a*cdf(-d1)))/365;
const rho=(call?K*T*b*cdf(d2):-K*T*b*cdf(-d2))/100;
const result={price,delta,gamma,vega,theta,rho};if(!Object.values(result).every(Number.isFinite))throw new RangeError('Model overflow');return result;
}
export function expectedMove({spot,volatilityPercent,days,straddlePrice=null}){
if(![spot,volatilityPercent,days].every(Number.isFinite)||spot<=0||volatilityPercent<=0||days<=0||(straddlePrice!==null&&(!Number.isFinite(straddlePrice)||straddlePrice<=0)))throw new RangeError('Invalid expected-move inputs');
const em=spot*(volatilityPercent/100)*Math.sqrt(days/365);
const result={ivExpectedMove:em,ivExpectedMovePercent:em/spot*100,ivLower:spot-em,ivUpper:spot+em};
if(straddlePrice!==null){const s=0.85*straddlePrice;result.straddleExpectedMove=s;result.straddleExpectedMovePercent=s/spot*100;result.straddleLower=spot-s;result.straddleUpper=spot+s;}
return result;
}
export function deltaHedge({type,side='long',contracts,multiplier=100,spot,strike,days,volatilityPercent,ratePercent=0,dividendPercent=0,sharesHeld=0}){
if(![contracts,multiplier,spot,strike,days,volatilityPercent,ratePercent,dividendPercent,sharesHeld].every(Number.isFinite)||!Number.isInteger(contracts)||contracts<=0||multiplier<=0||spot<=0||strike<=0||days<=0||volatilityPercent<=0||!['long','short'].includes(side))throw new RangeError('Invalid delta-hedge inputs');
const {delta,price}=blackScholes({spot,strike,years:days/365,volatility:volatilityPercent/100,rate:ratePercent/100,dividend:dividendPercent/100,type});
const positionDelta=(side==='long'?1:-1)*contracts*multiplier*delta;
const netDelta=positionDelta+sharesHeld;
const hedgeShares=-Math.round(netDelta);
return {optionPrice:price,deltaPerShare:delta,positionDelta,sharesHeld,netDelta,hedgeShares,hedgeAction:hedgeShares===0?'No hedge trade — already delta-neutral':hedgeShares>0?`Buy ${hedgeShares} shares`:`Sell ${-hedgeShares} shares`};
}
export function breakeven({strategy,strike,premium,contracts=1,multiplier=100,stockPrice,secondPremium,secondStrike}){
if(!Number.isInteger(contracts)||contracts<=0||!Number.isFinite(multiplier)||multiplier<=0)throw new RangeError('Invalid contracts or multiplier');
const m=contracts*multiplier,need=(ok,msg)=>{if(!ok)throw new RangeError(msg);};
const leg=()=>{need([strike,premium].every(Number.isFinite)&&strike>0&&premium>=0,'Strike and premium required');};
switch(strategy){
case 'long-call':leg();return {breakeven:strike+premium,totalPremiumPerShare:premium,maxLoss:premium*m,maxProfit:'Unlimited'};
case 'short-call':leg();return {breakeven:strike+premium,totalPremiumPerShare:premium,maxLoss:'Unlimited',maxProfit:premium*m};
case 'long-put':leg();need(strike-premium>0,'Premium exceeds strike');return {breakeven:strike-premium,totalPremiumPerShare:premium,maxLoss:premium*m,maxProfit:(strike-premium)*m};
case 'short-put':leg();need(strike-premium>0,'Premium exceeds strike');return {breakeven:strike-premium,totalPremiumPerShare:premium,maxLoss:(strike-premium)*m,maxProfit:premium*m};
case 'covered-call':leg();need(Number.isFinite(stockPrice)&&stockPrice>0,'Stock purchase price required');return {breakeven:stockPrice-premium,totalPremiumPerShare:premium,maxLoss:(stockPrice-premium)*m,maxProfit:(strike-stockPrice+premium)*m};
case 'protective-put':leg();need(Number.isFinite(stockPrice)&&stockPrice>0,'Stock purchase price required');need(stockPrice-strike+premium>0,'Strike too high for a protective put on this stock price');return {breakeven:stockPrice+premium,totalPremiumPerShare:premium,maxLoss:(stockPrice-strike+premium)*m,maxProfit:'Unlimited'};
case 'long-straddle':leg();need(Number.isFinite(secondPremium)&&secondPremium>=0,'Put premium required');{const t=premium+secondPremium;return {breakevenLow:strike-t,breakevenHigh:strike+t,totalPremiumPerShare:t,maxLoss:t*m,maxProfit:'Unlimited'};}
case 'long-strangle':leg();need(Number.isFinite(secondPremium)&&secondPremium>=0,'Put premium required');need(Number.isFinite(secondStrike)&&secondStrike>0&&secondStrike<strike,'Put strike (below the call strike) required');{const t=premium+secondPremium;return {breakevenLow:secondStrike-t,breakevenHigh:strike+t,totalPremiumPerShare:t,maxLoss:t*m,maxProfit:'Unlimited'};}
default:throw new RangeError('Unknown strategy');
}
}
===== file: shared/style.css =====
*{box-sizing:border-box}body{margin:0;background:#000;color:#fff;font:16px system-ui}main{max-width:1100px;margin:auto;padding:20px}section{border:1px solid #343434;border-radius:12px;padding:16px;margin:16px 0}h1{font-size:clamp(26px,5vw,42px)}h2{font-size:20px}label{display:grid;gap:6px}input,select,button{font:inherit;color:#fff;background:#121212;border:1px solid #777;border-radius:7px;padding:10px;min-width:0;width:100%}button{background:#123b31;cursor:pointer;width:auto;min-height:44px}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #5eead4}.leg,.inputs,#metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}.leg{padding:12px 0;border-bottom:1px solid #444}.metric{padding:12px;border:1px solid #555;border-radius:8px;overflow-wrap:anywhere}.metric strong{display:block;font-size:20px;margin-top:6px}svg{width:100%;height:auto;background:#080808;margin-top:16px}#error{color:#ff9494}p{line-height:1.5}.scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;margin-top:12px;font-size:14px}th,td{border:1px solid #343434;padding:8px;text-align:right;white-space:nowrap}th{background:#121212}td.pos{color:#5eead4}td.neg{color:#ff9494}td.base{background:#123b31;font-weight:700}
Questions about this product
Is there a free expected move calculator I can download?
Yes. Script Master Labs publishes this Expected Move Calculator as a free download on SML Dual Market (https://dual.scriptmasterlabs.com/product/free-expected-move-calculator). The complete calculator — the same working files sold in the paid edition — is in the free download, and its full source is printed on the product page. No payment, no account, no subscription.
How do I use the Expected Move Calculator?
Claim the free download, unzip it, and open the index.html inside the calculator's folder in any modern browser. Type your numbers and press Calculate. There is nothing to install.
Does the calculator send my numbers anywhere?
No. It runs entirely in your browser on your own device: no server, no account, no feed. The numbers you type never leave your device.
Is the free edition the complete calculator?
Yes — the same working files sold in the paid edition ($19 one-time). The paid edition adds the full written user guide, the evidence receipt, and the licensing and security reviews; nothing in the calculator itself is held back.