SML Dual Market
Instant download · 7-day refunds on every product — see the refund policy · Veteran-owned small business
Options Profit Calculator — Free Trading Calculator (Download, Runs in Your Browser)Options Profit Calculator — Free Trading Calculator (Download, Runs in Your Browser) — ZIP bundle cover

Options Profit Calculator — Free Trading Calculator (Download, Runs in Your Browser)

Free
Get it free
Free · instant download on claim · no account · signed receipt — how buying works →
Sold byScript Master Labs LLC (SDVOSB · UEI G24VZA4RLMK3 · CAGE 21U51)
File checkedWe test-download every product before it's listed (last checked Dec 4, 2026).
UpdatedDec 4, 2026
No account needed. Your download link appears right after checkout — bookmark it.
You get exactly this
free-options-profit-calculator.zip — complete calculator (HTML + JavaScript, runs in your browser) + README + free license (free edition)
What's inside
ZIP — browser calculator (HTML + JavaScript + CSS), README, free license — runs locally, no server
  • 27-options-profit-calculator/index.html — the calculator page — open this in a browser
  • 27-options-profit-calculator/ui.mjs — the interface logic
  • 27-options-profit-calculator/american.mjs — part of the calculator's engine (JavaScript module)
  • 27-options-profit-calculator/expiry.mjs — part of the calculator's engine (JavaScript module)
  • 27-options-profit-calculator/portfolio.mjs — part of the calculator's engine (JavaScript module)
  • 27-options-profit-calculator/valuation.mjs — part of the calculator's engine (JavaScript module)
  • shared/style.css — the styles
  • README-FIRST.md — what it does and how to run it
  • FREE-LICENSE.md — the free-edition license terms
Delivered as one download, the moment you claim it — no payment, no account.

About this product

Options Profit Calculator is a free trading calculator by Script Master Labs. It calculates multi-leg options profit and loss at expiration and before it. 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: multi-leg options profit and loss two separate ways. At expiration it is exact payoff arithmetic — intrinsic value — with exact break-evens. Before expiration it values the same position with the European Black–Scholes–Merton model (continuous dividend yield) and an American model, returning the theoretical price and the Greeks (delta, gamma, vega, theta, rho), plus a scenario grid of theoretical P/L across underlying prices. Everything runs locally in your browser: there is no account, no feed and no server, and the numbers you type never leave your device.

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/options-profit-calculator, $29 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

Options Profit Calculator is a free trading calculator by Script Master Labs. It calculates multi-leg options profit and loss at expiration and before it. 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.

Every file of the calculator is printed below, exactly as it ships in the free download. Claim the free download above to run it: unzip and open index.html in any browser — it runs entirely on your device, nothing you type leaves it. Educational software, not financial advice.

===== file: 27-options-profit-calculator/index.html =====
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Options Profit Calculator | SML</title><meta name="description" content="Calculate multi-leg options profit and loss, expiration break-even and theoretical Greeks using your own inputs."><meta name="robots" content="noindex"><link rel="stylesheet" href="../shared/style.css"></head><body><main><h1>Options Profit Calculator</h1><p>Enter your own contract prices. Expiration payoff and theoretical valuation are separate calculations.</p><section><h2>Strategy builder</h2><div id="legs"></div><button id="add">Add option leg</button></section><section class="inputs"><label>Valuation model<select id="model"><option value="american">American (early exercise)</option><option value="european">European</option></select></label><label>Underlying price<input id="spot" type="number" min="0" step="any"></label><label>Days remaining<input id="days" type="number" min="0" step="any" value="0"></label><label>Annual volatility (%)<input id="iv" type="number" min="0" step="any"></label><label>Annual risk-free rate (%)<input id="rate" type="number" step="any" value="0"></label><label>Annual dividend yield (%)<input id="dividend" type="number" step="any" value="0"></label><label>Total fees ($)<input id="fees" type="number" min="0" step="any" value="0"></label></section><button id="calculate">Calculate position</button><p id="error" role="alert"></p><section id="results" hidden><h2>Position analysis</h2><div id="metrics"></div><svg id="chart" viewBox="0 0 800 340" role="img" aria-label="Expiration profit and loss versus underlying price"></svg><p>Chart: expiration payoff, not a forecast.</p><div id="scenario-block" hidden><h2>Scenario grid — theoretical P/L</h2><p>Theoretical profit and loss before expiration across underlying prices (columns) and volatility levels (rows). The grid varies ONE shared volatility for all legs; per-leg volatility overrides are not supported in the grid. The highlighted cell is the entered price and volatility. Theoretical values are not executable quotes.</p><p id="scenario-error" role="alert"></p><div class="scroll"><table id="scenario-table"></table></div></div><button id="export">Export calculation JSON</button></section><section><h2>How options profit is calculated</h2><p>At expiration, a long call earns max(underlying price − strike, 0) minus premium per share. A long put earns max(strike − underlying price, 0) minus premium. Short positions reverse these amounts. Multiply by contract quantity and multiplier, sum legs, then subtract fees.</p><p>All legs must have the same underlying and expiration. American valuation includes early exercise; assignment, margin and discrete dividends are not modeled. Greeks are available only for the European model. Theoretical values are not executable quotes.</p></section></main><script type="module" src="ui.mjs"></script></body></html>

===== file: 27-options-profit-calculator/ui.mjs =====
import {analyze,scenarioGrid} from './portfolio.mjs';import {payoff} from './expiry.mjs';
const $=id=>document.getElementById(id);let last=null;
function add(){const d=document.createElement('div');d.className='leg';d.innerHTML='<label>Type<select data-k="type"><option value="call">Call</option><option value="put">Put</option></select></label><label>Side<select data-k="side"><option value="long">Long</option><option value="short">Short</option></select></label><label>Strike<input data-k="strike" type="number" min="0" step="any"></label><label>Premium/share<input data-k="premium" type="number" min="0" step="any"></label><label>Contracts<input data-k="contracts" type="number" min="1" value="1"></label><label>Multiplier<input data-k="multiplier" type="number" min="1" value="100"></label><button type="button">Remove leg</button>';d.querySelector('button').onclick=()=>{d.remove();invalidate()};$('legs').append(d);invalidate()}
function invalidate(){last=null;$('results').hidden=true;$('error').textContent='';$('scenario-block').hidden=true;$('scenario-error').textContent='';$('scenario-table').replaceChildren()}
function scenarios(legs,base){const block=$('scenario-block');if(base.years===0){block.hidden=true;return}block.hidden=false;try{const spots=[...new Set([0.8,0.9,0.95,1,1.05,1.1,1.2].map(m=>m===1?base.spot:Math.round(base.spot*m*100)/100))];const vols=[0.8,1,1.2].map(m=>m===1?base.volatility:base.volatility*m);const grid=scenarioGrid(legs,base,spots,vols);const t=$('scenario-table');t.replaceChildren();const head=document.createElement('tr');const corner=document.createElement('th');corner.textContent='Volatility \\ Price';head.append(corner);for(const s of spots){const th=document.createElement('th');th.textContent=money(s);head.append(th)}t.append(head);for(const row of grid){const tr=document.createElement('tr');const th=document.createElement('th');th.textContent=(row.volatility*100).toFixed(1)+'%';tr.append(th);for(const pt of row.points){const td=document.createElement('td');td.textContent=money(pt.pnl);td.className=pt.pnl>0?'pos':pt.pnl<0?'neg':'';if(pt.spot===base.spot&&row.volatility===base.volatility){td.classList.add('base');td.dataset.testid='scenario-base'}tr.append(td)}t.append(tr)}}catch(e){$('scenario-error').textContent='Scenario grid unavailable: '+e.message}}
function num(e){if(e.value.trim()==='')throw Error('Complete all required inputs');const n=Number(e.value);if(!Number.isFinite(n))throw Error('Invalid number');return n}
function money(n){return n.toLocaleString('en-US',{style:'currency',currency:'USD'})}
function draw(legs,spot,fees,profile){const svg=$('chart');svg.replaceChildren();const hi=Math.max(1,spot,...legs.map(l=>l.strike),...profile.breakEvens)*1.3;const xs=[...new Set([0,hi,...legs.map(l=>l.strike),...profile.breakEvens])].sort((a,b)=>a-b);const ys=xs.map(x=>payoff(legs,x,fees));const low=Math.min(0,...ys),high=Math.max(0,...ys),span=high-low||1;const X=x=>80+x/hi*690,Y=y=>280-(y-low)/span*240;function el(tag,attrs,txt){const e=document.createElementNS('http://www.w3.org/2000/svg',tag);for(const [k,v] of Object.entries(attrs))e.setAttribute(k,v);if(txt)e.textContent=txt;svg.append(e)}el('line',{x1:80,x2:770,y1:Y(0),y2:Y(0),stroke:'#777'});el('polyline',{points:xs.map((x,i)=>X(x)+','+Y(ys[i])).join(' '),fill:'none',stroke:'#5eead4','stroke-width':3});for(let i=0;i<=4;i++){const x=hi*i/4;el('text',{x:X(x),y:310,fill:'#fff','font-size':14,'text-anchor':'middle'},money(x));const y=low+span*i/4;el('text',{x:72,y:Y(y),fill:'#fff','font-size':12,'text-anchor':'end'},money(y))}}
$('add').onclick=add;document.querySelector('main').addEventListener('input',invalidate);$('calculate').onclick=()=>{invalidate();try{const legs=[...document.querySelectorAll('.leg')].map(d=>Object.fromEntries([...d.querySelectorAll('[data-k]')].map(e=>[e.dataset.k,e.tagName==='SELECT'?e.value:num(e)])));const days=num($('days'));const base={model:$('model').value,spot:num($('spot')),years:days/365,volatility:days===0?0:num($('iv'))/100,rate:num($('rate'))/100,dividend:num($('dividend'))/100,fees:num($('fees'))};const a=analyze(legs,base);const metrics={'Expiry P/L at entered price':money(a.pnlAtExpiry),'Theoretical P/L':money(a.modelPnl),'Maximum expiry profit':a.expiry.unboundedProfit?'Unlimited':money(a.expiry.maxProfit),'Maximum expiry loss':a.expiry.unboundedLoss?'Unlimited':money(a.expiry.maxLoss),'Break-even points':a.expiry.breakEvens.map(money).join(', ')||'None','Flat break-even ranges':a.expiry.flatBreakEvenRanges.map(([lo,hi])=>money(lo)+' to '+(hi===null?'unbounded':money(hi))).join('; ')||'None'};if(a.greeks)for(const [k,v] of Object.entries(a.greeks))metrics[k]=v.toFixed(4);$('metrics').replaceChildren();for(const [k,v] of Object.entries(metrics)){const d=document.createElement('div');d.className='metric';d.textContent=k;const s=document.createElement('strong');s.textContent=v;d.append(s);$('metrics').append(d)}draw(legs,base.spot,base.fees,a.expiry);scenarios(legs,base);last={legs,inputs:base,analysis:a,model:base.model+' / expiration payoff'};$('results').hidden=false}catch(e){$('error').textContent=e.message}};$('export').onclick=()=>{if(!last)return;const u=URL.createObjectURL(new Blob([JSON.stringify(last,null,2)],{type:'application/json'}));const a=document.createElement('a');a.href=u;a.download='sml-options-analysis.json';a.click();URL.revokeObjectURL(u)};add();


===== file: 27-options-profit-calculator/american.mjs =====
// American option valuation via Cox-Ross-Rubinstein recombining tree.
// Continuous dividend yield; no discrete dividend or assignment simulation.
export function american({spot:S,strike:K,years:T,volatility:v,rate:r=0,dividend:q=0,type,steps=500}){
 if(![S,K,T,v,r,q].every(Number.isFinite)||S<=0||K<=0||T<0||v<=0||!['call','put'].includes(type)||!Number.isInteger(steps)||steps<2||steps>2000)throw new RangeError('Invalid tree inputs');
 const intrinsic=s=>Math.max(0,type==='call'?s-K:K-s);
 if(T===0)return intrinsic(S);
 const dt=T/steps,logu=v*Math.sqrt(dt),u=Math.exp(logu),d=1/u,p=(Math.exp((r-q)*dt)-d)/(u-d),disc=Math.exp(-r*dt);
 if(!Number.isFinite(p)||p<0||p>1)throw new RangeError('Tree probability outside numerical bounds; adjust steps or inputs');
 const a=new Float64Array(steps+1);
 for(let j=0;j<=steps;j++)a[j]=intrinsic(S*Math.exp((2*j-steps)*logu));
 for(let i=steps-1;i>=0;i--)for(let j=0;j<=i;j++)a[j]=Math.max(intrinsic(S*Math.exp((2*j-i)*logu)),disc*((1-p)*a[j]+p*a[j+1]));
 if(!Number.isFinite(a[0]))throw new RangeError('Tree overflow');return a[0];
}


===== file: 27-options-profit-calculator/expiry.mjs =====
// Original SML expiry payoff engine. No market feed or probability claims.
export function payoff(legs, spot, fees=0) {
 if (!Array.isArray(legs)||!legs.length||!Number.isFinite(spot)||spot<0||!Number.isFinite(fees)||fees<0) throw new RangeError('Invalid inputs');
 return legs.reduce((sum,l)=>{
 const {type,side,strike,premium,contracts,multiplier=100}=l;
 if(!['call','put'].includes(type)||!['long','short'].includes(side)||![strike,premium,contracts,multiplier].every(Number.isFinite)||strike<=0||premium<0||!Number.isSafeInteger(contracts)||contracts<1||!Number.isSafeInteger(multiplier)||multiplier<1) throw new RangeError('Invalid leg');
 const intrinsic=type==='call'?Math.max(spot-strike,0):Math.max(strike-spot,0);
 const next=sum+(side==='long'?1:-1)*(intrinsic-premium)*contracts*multiplier;
 if(!Number.isFinite(next))throw new RangeError('Overflow'); return next;
 },-fees);
}
export function expiryProfile(legs,fees=0){
 const xs=[0,...new Set(legs.map(l=>l.strike))].sort((a,b)=>a-b);
 const ys=xs.map(x=>payoff(legs,x,fees));
 const slope=legs.reduce((s,l)=>s+(l.type==='call'?(l.side==='long'?1:-1)*l.contracts*(l.multiplier??100):0),0);
 const roots=[]; const flat=[];
 for(let i=0;i<xs.length;i++){
 if(ys[i]===0)roots.push(xs[i]);
 if(i&&ys[i]===0&&ys[i-1]===0)flat.push([xs[i-1],xs[i]]);
 if(i&&Math.sign(ys[i])*Math.sign(ys[i-1])<0)roots.push(xs[i-1]-ys[i-1]*(xs[i]-xs[i-1])/(ys[i]-ys[i-1]));
 }
 const last=xs.length-1;
 if(slope===0&&ys[last]===0)flat.push([xs[last],null]);
 if(slope!==0&&-ys[last]/slope>0)roots.push(xs[last]-ys[last]/slope);
 return {breakEvens:[...new Set(roots)],flatBreakEvenRanges:flat,maxProfit:slope>0?null:Math.max(...ys),maxLoss:slope<0?null:Math.max(0,-Math.min(...ys)),unboundedProfit:slope>0,unboundedLoss:slope<0,points:xs.map((spot,i)=>({spot,pnl:ys[i]}))};
}


===== file: 27-options-profit-calculator/portfolio.mjs =====
import {payoff,expiryProfile} from './expiry.mjs';
import {american} from './american.mjs';
import {european} from './valuation.mjs';
export function analyze(legs,{spot,years,volatility,rate=0,dividend=0,fees=0,model='european'}){
 if(!['american','european'].includes(model))throw new RangeError('Invalid model');
 const expiry=expiryProfile(legs,fees);
 const pnlAtExpiry=payoff(legs,spot,fees);
 if(years===0)return {expiry,pnlAtExpiry,modelPnl:pnlAtExpiry,greeks:null};
 const totals={modelPnl:-fees,delta:0,gamma:0,theta:0,vega:0,rho:0};
 for(const l of legs){const params={spot,strike:l.strike,years,volatility:l.volatility??volatility,rate,dividend,type:l.type};const m=model==='american'?{price:american(params)}:european(params);const units=(l.side==='long'?1:-1)*l.contracts*(l.multiplier??100);totals.modelPnl+=(m.price-l.premium)*units;for(const k of ['delta','gamma','theta','vega','rho'])if(model==='european')totals[k]+=m[k]*units;}
 if(!Object.values(totals).every(Number.isFinite))throw new RangeError('Overflow');
 const {modelPnl,...greeks}=totals;return {expiry,pnlAtExpiry,modelPnl,greeks:model==='american'?null:greeks};
}
export function scenarioGrid(legs,base,spots,volatilities){
 if(!Array.isArray(spots)||!Array.isArray(volatilities)||!spots.length||!volatilities.length||spots.length*volatilities.length>10000)throw new RangeError('Invalid grid size');
 if(legs.some(l=>l.volatility!=null))throw new RangeError('Grid requires shared volatility; remove leg overrides');
 return volatilities.map(volatility=>({volatility,points:spots.map(spot=>({spot,pnl:analyze(legs,{...base,spot,volatility}).modelPnl}))}));
}


===== file: 27-options-profit-calculator/valuation.mjs =====
// European Black-Scholes-Merton model; not an American exercise model.
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;}
export function european({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=Math.exp(-d1*d1/2)/Math.sqrt(2*Math.PI),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;
}


===== 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}
Frequently paired

Questions about this product

Is there a free multi-leg options profit calculator I can download?

Yes. Script Master Labs publishes this Options Profit Calculator as a free download on SML Dual Market (https://dual.scriptmasterlabs.com/product/free-options-profit-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 Options Profit 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 ($29 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.