Calculate the selling and marketing (S&M) expenses to revenue ratio, an efficiency ratio that measures the proportion of revenue spent on selling and marketing activities.

This ratio isolates the selling and marketing component of the combined SG&A expense line (see get_sga_to_revenue_ratio), which is useful for comparing customer-acquisition efficiency independently of administrative overhead.

The formula is as follows:

\[\text{S\&M} \;\text{to Revenue Ratio} = \text{Selling and Marketing Expenses} / \text{Revenue}\]

Also known as: S&M ratio, sales and marketing intensity.

Selling and Marketing Ratio in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_selling_and_marketing_ratio as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["CRM", "HUBS", "DDOG"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.ratios.get_selling_and_marketing_ratio()

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

How much of their revenue did Salesforce, HubSpot and Datadog spend on sales and marketing from 2021 to 2025?

Which returns:

  2021 2022 2023 2024 2025
CRM 0.4475 0.4314 0.3694 0.3498 0.3455
DDOG 0.2911 0.2957 0.2863 0.2819 0.2791
HUBS 0.4995 0.5119 0.4924 0.4639 0.4405

Parameters

get_selling_and_marketing_ratio accepts the following parameters.

ParameterTypeDescriptionExample
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 single-period flows (per quarter and not annualized with quarterly data).4
Share