These list of metrics in their historical form are extremely popular indicators and financial ratios often asked about. While we do have some of them as the latest snapshot in our Fundamentals API feed (MarketCapitalization and PERatio under Highlights section, PriceBookMRQ under Valuation), we don’t keep a history of these.

Using the data for the sample ticker AAPL (with the demo key that is provided in our financial documentation) and the date December 30th, 2020 we’ll show how it’s done.

## Historical Market Capitalization

This one is very easy to calculate. One needs to take the amount of shares outstanding from the outstandingShares section and multiply it by the historical price of the corresponding period taken from the EOD API feed.

Market Capitalization = Outstanding Shares × Price

So the market capitalization of Apple, Inc. for December 30th, 2020 will be:

The result. 17,114,000,000 × 133.5205 = 2,285,069,837,000.00

This works for any date.

## Historical Price-to-Earnings Ratio (PE Ratio)

This ratio is quite easy to calculate as well. One needs to divide the historical price of the stock by the corresponding historical EPS (epsActual taken from the Earnings section of the Fundamentals).

P/E ratio = Market Price per Share / ​Earnings per Share

The result. P/E ratio for Apple, Inc. for December 30th: 133.5205 / 1.68 = 79.4765

## Historical Price-to-Book Ratio (PB Ratio)

For this ratio, one has to calculate the book value first. Its formula is quite simple though:

Book Value = Total Assets – Total Liabilities

With that knowledge, we can calculate the P/B ratio for Apple, Inc., say,  for a specific day: December 30th, 2020. From the balance sheet for Q4, sample ticker fundamentals data, we need to get the total assets and total liabilities figures:

• totalAssets: 354,054,000,000.00
• totalLiab: 287,830,000,000.00

The book value of Apple, Inc. for 2020 Q4 will be: 354054000000.00 – 287830000000.00 =  66,224,000,000.00

Then we get to the formula for the ratio itself:

P/B ratio = Market Price per Share / ​Book Value per Share

Before going to the EOD API for the price, we need to know the figure to use in the denominator.

Quarterly outstanding shares for 2020 Q4. shares: 17114000000,

Book value per share = 66,224,000,000.00 / 17,114,000,000.00 = 3.8696

And finally, EOD price for 2020-12-30: adjusted_close: 133.5205,

P/B ratio for Apple, Inc. for Dec 30th, 2020: 133.5205 / 3.8696 = 34.5050

That’s it. The process can be repeated for any given date.

## Current Ratio

The Current Ratio is a liquidity ratio that measures a company’s ability to pay short-term obligations or those due within one year.

The current assets and current liabilities values could be found in the output of our Fundamental API in the Balance Sheet section:

Current Ratio = totalCurrentAssets / totalCurrentLiabilities

For the example we will use numbers from the AAPL Balance Sheet 2020 Q4:

Current Ratio = 154106000000 / 132507000000 = 1.163

## Price-to-Sales Ratio (P/S)

P/S ratio is an indicator of the value that financial markets have placed on each dollar of a company’s revenues.

To calculate the ratio you have to call the End-of-Day API to get the adjusted close price, Fundamentals API to get shares in the outstanding shares section, and the Total Revenue in the Income Statement section:

P/S = adjusted_close / (totalRevenue / shares)

For the example we will use numbers from the AAPL Quarterly outstanding and Income Statement 2020 Q4:

P/S = 133.5205 / (111439000000 / 17114000000) = 20.505

## Enterprise Value, EV to EBITDA, EV to Sales and EV To Operating Cash Flow

Enterprise value (EV) measures a company’s total value, often used as a more comprehensive alternative to equity market capitalization. To calculate EV you have to get the Market Capitalisation first (formula shown above), then access the data on debt and cash in the Balance Sheet section of the Fundamentals API output. The formula is following:

EV = Market Capitaliztion + (longTermDebt + shortTermDebt) – cashAndEquivalents

For the example we will use numbers from the AAPL Quarterly outstanding and Balance Sheet 2020 Q4:

EV = 2,285,069,837,000 + (99281000000 + 12762000000) – 36010000000 = 2234560837000

The EV/EBITDA ratio is a popular metric used as a valuation tool to compare the value of a company, debt included, to the company’s cash earnings less non-cash expenses. The EBITDA value you could retrieve from the Fundamentals API‘s Income Statement component.

For the example we will use numbers from the AAPL Income Statement 2020 Q4:

• EV: 2234560837000
• EBITDA: 36883000000

EV/EBITDA = 2234560837000 / 36883000000 = 60.58

The EV/Sales multiple gives investors a quantifiable metric of how to value a company based on its sales while taking into account both the company’s equity and debt. To get the Revenue number you need to access Fundamentals API the Income Statement part the formula will look like:

EV/Sales = EV / totalRevenue

For the example we will use numbers from the AAPL Income Statement 2020 Q4:

EV/Sales = 2234560837000 / 111439000000 = 20.05

the EV/CFO ratio helps us in understanding how long it will take the company to acquire existing shares and pay off outstanding obligations, using its operating cash flows.

EV/CFO = EV / totalCashFromOperatingActivities

For the example we will use numbers from the AAPL Cash Flow 2020 Q4:

EV/CFO = 2234560837000 / 38763000000 = 57.64

## Earnings Yield

The Earnings Yield refers to the earnings per share for the most recent 12-month period divided by the current market price per share. The earnings yield (the inverse of the P/E ratio):

Earnings Yield = epsActual / adjusted_close

Where epsActual is taken from the Earnings section of the Fundamentals Data API and adjusted_close from the End-of-Day API.

For the example we will use numbers from the AAPL’s Q4 data :

Earnings Yield = 1.68 / 133.5205 = 0.0126

## Debt To Assets

Debt To Assets is a leverage ratio that defines the amount of debt relative to assets owned by a company. It is calculated using total assets, long-term and short-term debt values from the Balance Sheet of the Fundamental API‘s output.

Debt To Assets = (longTermDebt + shortTermDebt) / totalAssets

For the example we will use numbers from the AAPL Balance Sheet 2020 Q4:

Debt To Assets = (99281000000 + 12762000000) / 354054000000 = 0.32

## Interest Coverage Ratio

The Interest Coverage ratio is a debt-to-profitability ratio used to determine how easily a company can pay interest on its outstanding debt. The ratio is calculated by dividing a company’s EBIT by the company’s Interest Expense during a given period, both values could be found in the Income Statement section of the Fundamental API.

Interest Coverage = ebit / interestExpense

For the example we will use numbers from the AAPL Income Statement 2020 Q4:

Interest Coverage = 34217000000 / 638000000 = 53.63

## Payout Ratio or Dividend Payout Ratio

The Payout Ratio is a financial metric showing the proportion of earnings a company pays its shareholders in the form of dividends, expressed as a percentage of the company’s total earnings. To calculate the ratio you need to divide the Dividends Paid from the Cash Flow section by the Net Income from the Income statement of the Fundamental API.

Payout Ratio = dividendsPaid / netIncome

For the example we will use numbers from the AAPL Income Statement and Cash Flow 2020 Q4:

Payout Ratio = 3613000000 / 28755000000 = 0.126

## Return on Equity (ROE) and Return on Assets (ROA) ratios

The ROE is a tool for an investor to evaluate how effectively the business generates profits. The ratio is calculated by dividing Net Income by Total Equity values could be found in the Income Statement and Balance Sheet sections of the Fundamental API respectively.

ROE = netIncome / totalStockholderEquity

For the example we will use numbers from the AAPL Income Statement and Balance Sheet 2020 Q4:

ROE = 28755000000 / 66224000000 = 0.434

The ROA can be used to determine how efficiently a company uses its assets to generate a profit. The Total Assets value could be found in the Balance Sheet section of the Fundamental API.

ROA = netIncome / totalAssets

For the example we will use numbers from the AAPL Income Statement and Balance Sheet 2020 Q4:

ROA = 28755000000 / 354054000000 = 0.081

## Return on Invested Capital (ROIC)

The ROIC is a calculation used to assess a company’s efficiency in allocating capital to profitable investments. For the calculation, EBIT value could be found in the Income Statement, and Total Assets and Total Current Assets in the Balance Sheet section of the Fundamental API.

ROIC = ebit / (totalAssets – totalCurrentAssets)

For the example we will use numbers from the AAPL Income Statement and Balance Sheet 2020 Q4:

ROIC = 34217000000 / (354054000000 – 154106000000) = 0.171

## Quick Ratio

The Quick Ratio is an indicator of a company’s short-term liquidity position and measures a company’s ability to meet its short-term obligations with its most liquid assets. To calculate the ratio, Short-Term Investments could be found in the Cashflow Section of the Fundamental API; the Cash and Cash Equivalents, Receivables, and Current Liabilities – could be accessed by looking in the Balance Sheet section of the Fundamental API.

Quick Ratio = (cashAndEquivalents + shortTermInvestments + netReceivables) / totalCurrentLiabilities

For the example we will use numbers from the AAPL Income Statement and Balance Sheet 2020 Q4:

Quick Ratio = (36010000000 + 40816000000 + 58620000000) / 132507000000 = 1.02

## Gross Profit Margin (GP)

This popular metric could be calculated by using Gross Profit and Total Revenue values from the Income Statement section of the Fundamental API.

Gross Profit Margin = grossProfit / totalRevenue

For the example we will use numbers from the AAPL Income Statement 2020 Q4:

Gross Profit Margin = 44328000000 / 111439000000 = 0.398

## Historical Dividend Yield

Historical Dividend Yield is a financial ratio (dividend/price) that shows how much a company pays out in dividends each year relative to its stock price.

Dividend Yield = (dividendsPaid / shares) / close

For the example we will calculate the quarterly dividend yield for AAPL by using numbers from the AAPL Cash Flow Statement 2020 Q4, EOD price for 2020-12-30, and shares outstanding from the Fundamental API:

Dividend Yield = (3613000000 / 17114000000) / 133.5205 = 0.0015

## Price-to-Cash Flow (P/CF)

The P/CF ratio is a stock valuation indicator or multiple that measures the value of a stock’s price relative to its operating cash flow per share.

P/CF = adjusted_close / (totalCashFromOperatingActivities / shares)

For the example we will calculate the P/CF ratio for AAPL by using numbers from the AAPL Cash Flow Statement 2020 Q4, EOD price for 2020-12-30, and shares outstanding from the Fundamental API:

P/CF = 133.5205 / (38763000000 / 17114000000) = 59.01

## Price to Free Cash Flow (PFCF)

The PFCF metric is very similar to the valuation metric of price to cash flow but is considered a more exact measure because it uses free cash flow, which subtracts capital expenditures (CAPEX) from a company’s total operating cash flow, thereby reflecting the actual cash flow available to fund non-asset-related growth.

PFCF = (adjusted_close * shares) / freeCashFlow

For the example we will calculate the PFCF ratio for AAPL by using numbers from the AAPL Cash Flow Statement 2020 Q4, EOD price for 2020-12-30, and shares outstanding from the Fundamental API:

PFCF = (133.5205 * 17114000000) / 35263000000 = 64.80

## Free Cash Flow Yield(FCFY)

Free cash flow yield is a financial solvency ratio that compares the free cash flow per share a company is expected to earn against its market value per share.

FCFY = freeCashFlow / (adjusted_close * shares)

For the example we will calculate the PFCF ratio for AAPL by using numbers from the AAPL Cash Flow Statement 2020 Q4, EOD price for 2020-12-30, and shares outstanding from the Fundamental API:

FCFY = 35263000000 / (133.5205 * 17114000000) = 0.015

## Debt-to-Equity (D/E)

The D/E ratio is used to evaluate a company’s financial leverage

D/E = (longTermDebt + shortTermDebt) / totalStockholderEquity

For the example we will use numbers from the AAPL Balance Sheet 2020 Q4:

D/E = ( 99281000000 + 12762000000) / 66224000000 = 1.69

## Net Debt-to-EBITDA Ratio

The net debt-to-EBITDA ratio is a debt ratio that shows how many years it would take for a company to pay back its debt if net debt and EBITDA are held constant. However, if a company has more cash than debt, the ratio can be negative.

Net debt-to-EBITDA = netDebt / ebitda

## Return On Tangible Assets (RoTE)

The RoTE ratio helps us assess a company’s performance and is frequently used when analyzing banks and insurance companies.

RoTE = netIncome / (totalAssets – intangibleAssets)

## Sales per share

Sales per share is a ratio that computes the total revenue earned per share over a designated period.

Sales per share = totalRevenue/shares

## Capex Per Share

Capex Per Share is the amount of Capital Expenditure Per Share.

Capex Per Share = capitalExpenditures/shares

## Cash Ratio

The Cash Ratio evaluates the company’s ability to repay its short-term debt with cash or near-cash resources, such as easily marketable securities. This information is useful to creditors when they decide how much money, if any, they would be willing to loan a company.

Cash Ratio = cashAndEquivalents / totalCurrentLiabilities

## Return on Capital Employed (ROCE)

The ROCE ratio can help to understand how well a company is generating profits from its capital as it is put to use. ROCE is one of several profitability ratios financial managers, stakeholders, and potential investors may use when analyzing a company for investment.

ROCE = ebit/(totalAssets-totalCurrentLiabilities)

## Debt Ratio

The Debt Ratio can be interpreted as the proportion of a company’s assets that are financed by debt.

Debt Ratio = totalLiab/totalAssets

## Operating Profit Margin

The operating profit margin measures how much profit a company makes on a dollar of sales after paying for variable costs of production. Higher ratios are generally better, illustrating the company is efficient in its operations and is good at turning sales into profits.

Operating Profit Margin = operatingIncome / totalRevenue

For the example we will use numbers from the AAPL Income Statement 2020 Q4:

Operating Profit Margin = 33534000000 / 111439000000 = 0.3

## Berry Ratio

The Berry Ratio is used as an indicator of a company’s profit in a given period. A ratio coefficient of 1 or more indicates that the company is making a profit above all variable expenses, whereas a coefficient below 1 indicates that the firm is losing money.

Berry Ratio = (grossProfit – totalOperatingExpenses) / totalOperatingExpenses

For the example we will use numbers from the AAPL Income Statement 2020 Q4:

Berry Ratio = (44328000000 – 10794000000) / 10794000000 = 3.11

## Assets Turnover Ratio

The Asset Turnover Ratio measures the efficiency of a company’s assets in generating revenue or sales.

Assets Turnover Ratio = totalRevenue / totalAssets = 111439000000 / 354054000000 = 0.31