Calculate the price to sales ratio (P/S), a valuation ratio that compares a company’s market capitalization to its total revenue.

The price to sales ratio is particularly useful for valuing companies that are not yet profitable (and therefore have no meaningful P/E ratio), since revenue is typically positive even when earnings are not, and is less susceptible to accounting distortions than earnings-based multiples. It is, however, less informative than earnings- or cash-flow-based multiples for mature, profitable companies since it ignores profitability and cost structure entirely.

The formula is as follows:

\[\text{Price to Sales Ratio} = \text{Market Cap} / \text{Revenue}\]

Also known as: P/S ratio, sales multiple.

Price to Sales Ratio (PS) in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_price_to_sales_ratio as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["NVDA", "AMD", "INTC"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.ratios.get_price_to_sales_ratio()

Or, after setting up the Finance Toolkit MCP, ask:

How did the price-to-sales ratios of Nvidia, AMD and Intel compare from 2021 to 2025?

Which returns:

  2021 2022 2023 2024 2025
AMD 10.7614 4.3114 10.5618 7.6685 10.1148
INTC 2.6655 1.7282 3.903 1.6161 3.3903
NVDA 27.7019 13.5824 20.2731 25.5249 21.1721

Parameters

get_price_to_sales_ratio accepts the following parameters.

ParameterTypeDescriptionExample
show_dailyboolWhether to show daily values: the close of each trading day against the statement figures of the latest period that has ended on or before that day (also when it ended before the start date), so no figures are used before their period closes. Defaults to False.True
dilutedboolWhether to use diluted shares in the calculation. Defaults to True.False
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the ratios. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
compoundboolWhether the growth is the compound annual growth rate over the lag (e.g. lag=5 for the five-year CAGR) instead of the total change. Defaults to False.False
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
trailingintThe number of periods to sum flows (income and cash flow statement items) over, with balance sheet items averaged over the same number of period ends. E.g. 4 with quarterly data gives the trailing twelve months (TTM) and 3 with annual data a three-year cumulative figure. Defaults to None, which uses the trailing twelve months (4 quarters) with quarterly data and single years with annual data.4
Share