Skip to main contentSkip to content
Squeeze Setups A live squeeze scanner built around the Slingshot Squeeze, with 22 years of backtest results behind it. See it, $99/month →
TOS Indicators
  • Tools

    Categories

    • Indicators
    • Backtesters
    • Scans
    • Dashboards
    • thinkScript
    • Member Resources
    Browse Full Library

    Featured Tutorials

    Fair Value Gap Indicator
    Fair Value Gap Indicator
    Indicators

    Download our free Fair Value Gap indicator for ThinkorSwim. It shades every...

    Learn more →
    False Breakout Scanner for ThinkorSwim (Free Scan Pair)
    False Breakout Scanner for ThinkorSwim (Free Scan Pair)
    Scans

    A two-scan pair that flags failed breakouts and failed breakdowns with volume...

    Learn more →
    Heiken Ashi Trend Indicator
    Heiken Ashi Trend Indicator
    Indicators

    Download our Custom Heiken Ashi indicator for ThinkOrSwim. Full ThinkScript code, formula...

    Learn more →

    Popular Posts

    Unusual Volume Pro Scans
    Unusual Volume Pro Scans
    Scans

    4 additional scans to find unusual volume overlapping with key...

    Learn more →
    High Short Interest Near 52 Week Highs (thinkScript)
    High Short Interest Near 52 Week Highs (thinkScript)
    Scans

    Build a simple scan in which to find stocks that...

    Learn more →
    Upcoming Earnings with High Short Interest
    Upcoming Earnings with High Short Interest
    Scans

    Build a scan to find stocks that are likely to...

    Learn more →
  • Courses
    Squeeze Course
    Squeeze Course
    19 Modules

    Scan, backtest, and trade the TTM Squeeze setup with precision.

    View Course →
    Earnings Course
    Earnings Course
    3 Modules

    Master earnings plays with free indicators and proven strategies for ThinkOrSwim.

    View Course →
    V-Shaped Reversals
    V-Shaped Reversals
    7 Modules

    Identify and trade powerful V-shaped reversal patterns with confidence and precision.

    View Course →
    Fibonacci Trading
    Fibonacci Trading
    4 Modules

    Learn to trade Fibonacci retracements and extensions in ThinkOrSwim effectively.

    View Course →
  • Products
    Futures Volatility Box Premium
    Futures Volatility Box

    Volatility models for 10 major futures markets, including the micros.

    Explore Futures VB →
    Stock Volatility Box Premium
    Stock Volatility Box

    Volatility levels for 600+ stocks and ETFs, with a live scanner.

    Explore Stock VB →
    Opening Range Breakouts Premium
    Opening Range Breakouts

    Scans 600+ stocks every 2 seconds for opening range breaks, with a backtester.

    Explore ORB Setups →
My Account
All Indicators
Beginner 28 minutes ThinkOrSwim

How to Build a Covered Call Calculator in ThinkorSwim

A free covered call calculator for the ThinkorSwim option chain: one column shows each call's return if you keep the premium and if you're called away.

Download Calculator
How to install in ThinkOrSwim →
Table of Contents
  • Key Takeaways
  • What Is a Covered Call?
  • Covered Call Income Compared to Rent
  • The Covered Call Formulas, Built in Excel First
  • How to Add the Covered Call Calculator to ThinkorSwim
  • How the Code Works
  • The KOPN Example From the Video
  • How I Pick a Strike to Sell
  • The Advanced Version and the Other Options Calculators
  • Common Problems and Customizing

Options Calculator

$
$
$
$
Premium received
$150.00
Premium return
1.30%
Premium return vs cost basis
—
Total return if called away
5.65%
Total return vs cost basis
—
Premium received
—
Cash required
—
Premium yield
—
Annualized yield
—
Effective entry if assigned
—
Discount vs current
—

For educational use. Not investment advice.

In this tutorial I build a covered call calculator for the ThinkorSwim option chain. It’s a custom quote column that prints 2 returns next to every call strike: what you make if you keep only the premium, and what you make if your shares are called away at the strike. With it you can compare strikes, expirations and stocks without filling in a spreadsheet.

The video has 4 parts: a comparison with rental income, the math in Excel, the thinkScript code, and a live example in KOPN. It’s for traders who already sell covered calls and want the numbers faster, and for anyone weighing the strategy for the first time. The finished code is a free download.

Key Takeaways

  • The covered call calculator is a free thinkScript custom quote for the ThinkorSwim option chain. It prints 2 returns on every call: the premium alone, and the premium plus the share gain if your shares are called away.
  • Both returns divide by the cost of 100 shares at the stock’s last close. The premium is the option’s last close times 100.
  • In the video, AT&T (T) closed at $29.76 and its 30 strike call last traded at $0.43, so the column read 1.44% | 2.25%.
  • The label turns green when the if-called return is 50% or more. In the video, KOPN’s April 16, 2021 calls turned green from the 17.50 strike, which showed 4.94% | 62.03%.
  • The download is the code from the video as a .txt file for a custom quote slot. Volatility Box members also get an advanced version with a cost basis input.

What Is a Covered Call?

A covered call is a trade where you own 100 shares of a stock and sell 1 call option against them. Selling the call gives the buyer the right to buy your shares at the strike price, and you collect the premium for it. In the video I treat the shares like a rental house and the premium like the rent.

Two outcomes matter at expiration, and the covered call calculator prices both of them:

  • Not exercised. The stock finishes below the strike. You keep the premium and the shares, and you can sell another call.
  • Exercised (called away). The stock finishes above the strike. You keep the premium plus the gain from your entry up to the strike, and the shares are gone.

Covered Call Income Compared to Rent

The rental comparison in Part 1 of the video uses a house for sale in Indiana as the baseline. The seller’s worksheet listed a cash price of $67,500 and $373.34 of monthly cash flow after expenses. I used about 1% a month as the rent baseline and left equity appreciation out of it.

Seller worksheet for an Indiana single family rental with a $67,500 cash price and $373.34 monthly cash flow highlighted
The seller’s worksheet for the Indiana rental: $67,500 cash price, $650 current rent and $373.34 of monthly cash flow after expenses. The seller made it, so the numbers are likely on the generous side.

Next I priced the at-the-money call in the April monthly series, 25 days from expiration, on 4 stocks from 4 volatility tiers. These are the quotes from the day of the video:

Stock Volatility tier Implied volatility (April series) Return if not exercised Return if exercised
AT&T (T) Low 25% 1.44% 2.25%
Fastly (FSLY) Mid 74.49% 5.3% 11.23%
CURI High 119% 9.32% 18%
AMC Very high 196% 19% A little above 19%

Every tier in the table cleared the 1% rent baseline, and the premium rose with implied volatility. That extra premium is pay for extra risk: you have to be willing to sit in the shares if the volatility takes them lower. At AMC’s 196%, the premium alone was 19%, and being called away added only a little more.

Real estate is a different asset class with different risks, so the comparison is apples to oranges. Premiums also change with price and implied volatility every day, so treat these numbers as the video’s snapshot.

The Covered Call Formulas, Built in Excel First

The covered call calculator runs 2 formulas, and Part 2 of the video builds them in Excel before writing any code. Each row needs 4 inputs: the symbol, the stock’s closing price, the strike of the call you’d sell, and the premium you’d collect. The return is measured against the cost of 100 shares.

Return Formula (1 contract, 100 shares) AT&T 30 strike in the video
If not exercised Premium / (stock price x 100) $43 / $2,976 = 1.44%
If exercised (Premium + (strike – stock price) x 100) / (stock price x 100) ($43 + $24) / $2,976 = 2.25%

For AT&T, the stock closed at $29.76 and the 30 strike call last traded at $0.43, or $43 for 1 contract. If the call isn’t exercised, the return is the $43 premium. If it is, you sell the shares at $30, a gain of $0.24 a share or $24, so the total return is $67.

The 31 strike shows the trade-off. It paid only $18, or 0.60%, but if exercised it returned $142, or 4.77%, because the strike sits further above the stock price.

The if-called return is also the most a covered call can make by expiration: above the strike, your shares go at the strike however high the stock trades. The premium lowers your breakeven on the shares by the same amount, so on AT&T’s 30 strike it moves from $29.76 to $29.33. Neither formula counts dividends, and both cover the time to expiration, not a full year.

Excel sheet with covered call returns for AT&T at $29.76 on the 30 and 31 strike calls
The Excel version for AT&T at $29.76: the 30 strike returns 1.44% if not exercised and 2.25% if exercised, and the 31 strike returns 0.60% and 4.77%.

Google Sheets makes this step faster, because its Google Finance function can fill in the current price for you. Either way, one strike by hand is quick, and comparing every strike, every expiration and a few stocks (AT&T against Verizon and T-Mobile, say) takes far too long.

The web calculator at the top of this page runs the same 2 formulas for one trade. Enter the stock price, strike, premium and number of contracts, and it shows the premium received, the premium return and the total return if called away. Its optional cost basis field adds both returns measured from your own entry price.

How to Add the Covered Call Calculator to ThinkorSwim

The covered call calculator lives in a custom quote column on the option chain, so it goes in the Trade tab instead of on a chart. Here are the steps from the video:

  1. Open the Trade tab, where the option chain lives.
  2. Click Layout at the top of the option chain and choose Customize from the drop-down.
  3. In the Customize window, open the drop-down and choose Custom Quotes.
  4. Double-click an unused custom quote (it may be named Custom Quote 1) to add it to your current set of columns.
  5. Click the scroll icon next to it to open the thinkScript editor, delete the default code, and paste in the code from the Code tab or the download.
  6. Click OK, then OK again. The new column shows 2 percentages for every call strike.

ThinkorSwim gives you a limited number of custom quotes, and the same slots feed dashboard scripts and other option scripts, so plan which ones you keep loaded. To edit the code later, go back to Layout, then Customize, and click the same scroll icon.

If you haven’t added custom code to ThinkorSwim before, our guide on how to import a study into ThinkorSwim covers the basics.

How the Code Works

The calculator’s code is 8 statements of thinkScript, and its math lines follow the columns of the Excel sheet. I built it one line at a time and tested each value with a label before moving on.

Step 1: Shares and Contracts

def maxShares = 100;
def maxContracts = 1;

I define these once so they’re easy to change in one place. They matter if you later want to see returns in dollars against a monthly income goal. If you change them, change both together (2 contracts and 200 shares) so the percentages stay the same.

Step 2: The Premium in Dollars

def premium = maxContracts * close * 100;

Here close is the last price of the option itself. The custom quote runs on each strike’s row, so close reads that strike, and times 100 gives the premium in dollars for 1 contract. When I tested it on AT&T, the column showed 43 for the 30 strike and 18 for the 31 strike.

Step 3: The Premium as a Percentage

def premiumPct = premium/(MaxShares * close(getUnderlyingSymbol()));

close(getUnderlyingSymbol()) reads the stock’s close instead of the option’s, so the bottom of the fraction is the cost of 100 shares. For AT&T at $29.76 it returned 1.44%, the same as the Excel sheet. thinkScript ignores capitalization, so MaxShares and maxShares are the same variable.

Step 4: The Return if Your Shares Are Called Away

def strikePriceGain = getStrike() - close(getUnderlyingSymbol());
def premiumPlusSharesPct = ((strikePriceGain * maxShares) + premium)/(MaxShares * close(getUnderlyingSymbol()));

getStrike() returns the strike of the row. Subtracting the stock price gives the gain per share if the shares are called away, $0.24 for AT&T’s 30 strike. That gain times 100 shares, plus the premium, over the cost of the shares gave 2.25%.

For a strike below the stock price the gain is negative, so the second number can fall below zero. In the KOPN option chain screenshot further down, the April 2.5 strike shows 73.61% | -3.95%.

Step 5: The Label and Its Color

AddLabel(yes, AsPercent(premiumPct) + " | " + AsPercent(premiumPlusSharesPct), if premiumPlusSharesPct >= 0.5 then color.green else color.white);

AddLabel prints both numbers with AsPercent, split by a bar: the premium return on the left and the if-called return on the right. The label turns green when the if-called return is 0.5 (50%) or more and stays white otherwise. I set it to an outrageous 50% in the video. It’s an arbitrary number, so pick your own.

The KOPN Example From the Video

KOPN is the stock I used to apply the covered call calculator in Part 4 of the video, because I already had a reason to be bullish on it. It had a Slingshot Squeeze and a Squeeze Signal on the daily chart, and the Slingshot Squeeze stats on the chart showed 2 winners and 1 loser, with an average win of 15.96% and an average loss of 0.48%.

The 127.2% Fibonacci extension sat at $15.68 and the 161.8% extension at $18.30. If I expected a move into that zone, a strike between those levels was the place to sell a call. For more on trading Fibonacci levels, see our Fibonacci Trading Course.

KOPN daily chart at $11.14 with Slingshot Squeeze stats and Fibonacci extension levels above price
KOPN on the daily chart at $11.14, with the Slingshot Squeeze stats (2 winners, 1 loser) and the Fibonacci extensions at $15.68 (127.2%) and $18.30 (161.8%).

With 100 shares bought at $11.14, the calculator showed these returns on the calls I looked at in the video:

Expiration (days left) Strike Return if not exercised Return if exercised
April 16, 2021 (26) 17.50 4.94% 62.03%
April 16, 2021 (26) 20 (16 delta) 2.87% 82.41%
May 21, 2021 (61) 20 8.08% 87.61%
July 16, 2021 (117) 20 About 16% Not read out

The 17.50 strike is where KOPN’s April calls first crossed the 50% threshold. If KOPN stayed below $17.50 through April 16, the premium alone returned 4.94%. If the shares were called away at $17.50, the total return was 62%.

The 20 strike, a 16 delta call, still paid 2.87%, between $30 and $40, and returned 82.41% if exercised. In rental terms, the house cost about $1,100 and the 20 strike paid about $35 of rent for 26 days. Lower strikes paid upwards of $150, if you were willing to sell the house fairly quickly.

If KOPN finished between the 2 extensions, below the 20 strike, the call would expire and I’d keep 100% of the premium. Then I could sell a call in the May series at a higher strike and repeat the trade.

KOPN option chain with a Covered Calls column showing two return percentages for each call strike
The Covered Calls column on KOPN’s option chain for the April 16 and May 21, 2021 expirations. Green labels mark strikes where the if-called return is 50% or more.

Comparing Expirations

The covered call calculator shows every expiration already calculated, so comparing series takes seconds. Going from the 26-day April series to the 61-day May series, the 20 strike’s premium return rose from 2.87% to 8.08%. That’s 5.21% more premium for 35 more days of risk.

The trade-off: the May 20 strike had less liquidity than the April one, and you have to stay in the trade longer while the premium erodes. I prefer the series around 30 days to expiration, where theta decay starts to work in your favor.

How I Pick a Strike to Sell

The covered call calculator handles the math, and the chart picks the strike. I look for strikes near a level where I’d be happy to sell my shares anyway, like the Fibonacci extensions on KOPN. Then I use the column to compare the premium return and the if-called return at each one, across a few expirations, and pick the strike that pays best for that plan.

The premium is your only cushion if the stock drops: you hold all 100 shares through the decline. And if it rallies past your strike, your shares are called away and you give up the gain above it. Decide before you buy where you’d sell the shares if the trade fails, and size the position so that loss is a small, fixed part of your account.

The Advanced Version and the Other Options Calculators

The covered call calculator is Part 1 of our options calculator series for the ThinkorSwim option chain. The other calculators reuse the math on this page:

  • Advanced Covered Call Calculator (Volatility Box members). Adds a cost basis input for shares you already own, such as a KOPN entry at the Market Pulse line at $9.46 instead of $11.14.
  • Cash-Secured Put Calculator (free). Shows the premium return and the breakeven price for every put strike.
  • Wheel Option Calculator (members). Puts the covered call math on calls and the put math on puts, in one custom quote.

Common Problems and Customizing

Most covered call calculator problems come from how custom quotes work in ThinkorSwim:

  • The column shows NaN or “loading”. ThinkorSwim needs a moment to calculate each row after you click OK. In the video the NaN values cleared on their own.
  • The put side shows odd numbers. A custom quote prints on both sides of the chain. The covered call formula is meant for calls, so ignore the put side or use the cash-secured put calculator there.
  • A thinly traded strike looks off. The column prices each strike at its last close, not the current bid or ask. Check the bid and ask before you place the order.
  • The green threshold won’t change. The code has a maxPctThreshold input set to 0.5, but the AddLabel line compares against a typed-in 0.5. Edit that number, or swap in the input with the edit below.

Here is my suggested edit for the threshold. It isn’t in the video or the download: replace the AddLabel line with this one, which compares against maxPctThreshold instead of 0.5.

AddLabel(yes, AsPercent(premiumPct) + " | " + AsPercent(premiumPlusSharesPct), if premiumPlusSharesPct >= maxPctThreshold then color.green else color.white);

With that change, the input controls the color, as a decimal: 0.3 means 30%. In the video, AT&T’s chain showed no green at all with 35 strikes listed, while KOPN turned green from the 17.50 strike up. For another script that reads the option chain, see our Option Chain Relative Value tutorial.

Covered Call Calculator.ts
<pre><code>#Written by TOS Indicators - 2021
#Home of the Volatility Box
#Covered Call Calculator
#Tutorial: https://www.tosindicators.com/indicators/covered-call-calculator
#The following thinkSript code needs to be pasted in a Custom Quote script on the options chain.


input maxPctThreshold = 0.5;

def maxShares = 100;
def maxContracts = 1;

def premium = maxContracts * close * 100;
def premiumPct = premium/(MaxShares * close(getUnderlyingSymbol()));

def strikePriceGain = getStrike() - close(getUnderlyingSymbol());
def premiumPlusSharesPct = ((strikePriceGain * maxShares) + premium)/(MaxShares * close(getUnderlyingSymbol()));


AddLabel(yes, AsPercent(premiumPct) + " | " + AsPercent(premiumPlusSharesPct), if premiumPlusSharesPct >= 0.5 then color.green else color.white);</code></pre>

Want the .ts file and the one-click import? Both come with a free account.

Create Free Account Login
A covered call calculator shows the return on selling a call against 100 shares you own. Ours runs inside the ThinkorSwim option chain as a custom quote column and prints 2 numbers on every call: the premium as a percentage of the share cost, and the total return if your shares are called away at the strike.
Open the Trade tab, click Layout above the option chain and choose Customize. Pick Custom Quotes from the drop-down, double-click an unused custom quote to add it, then click its scroll icon to open the editor. Delete the default code, paste in the calculator code and click OK twice.
The left number is your return if the call expires and you keep only the premium. The right number is your return if the call is exercised: the premium plus the gain from the stock price up to the strike. Both divide by the cost of 100 shares at the stock's last close.
Divide the premium by the cost of the shares for the return if not exercised. For the return if exercised, multiply the strike minus the stock price by 100 shares, add the premium, and divide by the same cost. In the video, AT&T at $29.76 with a $43 premium on the 30 strike gave 1.44% and 2.25%.
The label turns green when the if-called return is 50% or more. The download has a maxPctThreshold input, but the AddLabel line uses a fixed 0.5. To change the cutoff, edit that number, or make the small edit I suggest on this page (not in the video) that compares against maxPctThreshold instead. In the video, KOPN's April calls turned green from the 17.50 strike up.
The ThinkorSwim column measures every return from the stock's current close, which fits a new trade. For one trade, the web calculator at the top of this page has an optional cost basis field. On the option chain, the Advanced Covered Call Calculator for Volatility Box members adds a cost basis input, so the column shows returns from your own entry price.
In the video I prefer the series around 30 days to expiration, where theta decay works in your favor. Longer series pay more premium: KOPN's 20 strike went from 2.87% at 26 days to 8.08% at 61 days. The trade-off is less liquidity and more time in the trade.
The custom quote prints on both sides of the option chain, but its formula is built for calls, so the numbers on the put side aren't useful. For puts, use our free cash-secured put calculator, which shows the premium return and the breakeven price for each put strike.

Here are some resources that you may find useful:

  • How to import a study into ThinkOrSwim (video tutorial)
  • Cash-Secured Put Calculator for ThinkOrSwim
  • Advanced Covered Call Calculator (members)
  • Wheel Option Calculator (members)
  • Option Chain Relative Value script
  • More free ThinkOrSwim indicators
Featured Tools:
Stock Volatility Box

Stock Volatility Box

Spot reversal zones across 600 stocks & ETFs.

  • Hourly & daily models
  • Powerful Live Scanner
  • Built for day traders
Futures Volatility Box

Futures Volatility Box

Pinpoint reversal zones in 10 major futures markets.

  • 5 models (incl. Scalper)
  • ThinkOrSwim & TradingView
  • SPX traders
ORB Setups

ORB Setups

Find the best Opening Range Breakout setups.

  • Powerful real-time scanner
  • Instant backtests
  • 2+ years data

Get Free Access

Create a free account for downloads and new tutorial alerts.

Create Free Account

Related tutorials and research

Cash-Secured Put Calculator for ThinkorSwim

Cash-Secured Put Calculator for ThinkorSwim

Indicators · Intermediate
How to Build a Fair Value Gap Indicator in ThinkorSwim

How to Build a Fair Value Gap Indicator in ThinkorSwim

Indicators · Beginner-Friendly
How to Build a Heiken Ashi Trend Dots Indicator in ThinkorSwim

How to Build a Heiken Ashi Trend Dots Indicator in ThinkorSwim

Indicators · Beginner-Friendly
How to Build a Commodities Tracker in ThinkorSwim

How to Build a Commodities Tracker in ThinkorSwim

Indicators · Beginner
Trend Squeeze Indicator for ThinkorSwim

Trend Squeeze Indicator for ThinkorSwim

Indicators · Beginner
Volume Intensity Indicator for ThinkorSwim

Volume Intensity Indicator for ThinkorSwim

Indicators · Beginner-Friendly

Ready to Trade With an Edge?

Join 40,000+ traders using institutional-grade tools for ThinkOrSwim.

Get the Bundle
TOS Indicators

Premium thinkorswim indicators, scans, and trading tools to help you trade smarter.

ThinkOrSwim Tools

  • Indicators
  • Scans
  • Backtesters
  • Dashboards
  • thinkScript
  • Browse All

Courses

  • Squeeze Course
  • Earnings Course
  • V-Shaped Reversals
  • Fibonacci Trading

Products

  • Futures Volatility Box
  • Stock Volatility Box
  • ORB Setups
  • Shop All

Guides

  • TTM Squeeze
  • Automated Trading
  • Volatility Trading
  • Opening Range Breakouts
  • Trade Reports
  • Contact Us

© 2026 TOS Indicators. All rights reserved.

Privacy Policy Terms of Service Disclaimer Accessibility

The information contained on this website is solely for educational purposes, and does not constitute investment advice. The risk of trading in securities markets can be substantial. You must review and agree to our Terms of Service prior to using this site.

U.S. Government Required Disclaimer - Commodity Futures Trading Commission. Futures and options trading has large potential rewards, but also large potential risk. You must be aware of the risks and be willing to accept them in order to invest in the futures and options markets. Don't trade with money you can't afford to lose. This website is neither a solicitation nor an offer to Buy/Sell futures or options. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this website. The past performance of any trading system or methodology is not necessarily indicative of future results.

Individual results may vary, and testimonials are not claimed to represent typical results. All testimonials are by real people, and may not reflect the typical purchaser's experience, and are not intended to represent or guarantee that anyone will achieve the same or similar results.

TOS Indicator's Traders and employees will NEVER manage or offer to manage a customer or individual's options, stocks, currencies, futures, or any financial markets or securities account. If someone claiming to represent or be associated with TOS Indicator solicits you for money or offers to manage your trading account, do not provide any personal information and contact us immediately.

CFTC RULE 4.41 - HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY, SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.