Calculations
Python Calculation Interview Questions
Calculations are the rates, shares and percentages most analytics answers come down to: conversion rate, revenue per order, share of total. The arithmetic is simple. Deciding what belongs on the bottom of the fraction is the hard part.
What calculation questions ask you to do
Across the questions here, these are the shapes that come up:
- Work out a conversion or completion rate
- Express one group as a share of the total
- Compare two periods as a percentage change
- Produce a per-unit figure such as revenue per order
- Average something where a plain average would be misleading
Common mistakes with calculations
Two things go wrong, and both are on the bottom of the fraction. Dividing by a count that can reach zero either errors or returns nothing at all. And dividing one whole number by another throws away the decimals in several databases, so a conversion rate comes back as 0 instead of 0.37.
Questions to practice
- Even-numbered ordersSQL
Best Buyeasy - Inventory valueSQL
Walmarteasy - Median order valueStatistics
Airbnbeasy - Order amount with taxSQL
Stripeeasy - Fare per kilometer by citySQL
Ubermedium - High credit utilizationSQL
Capital Onemedium - Outliers by z-scoreStatistics
Stripemedium - Standard deviation of scoresStatistics
DraftKingsmedium - The 95th percentileStatistics
Datadogmedium - Correlation between metricsStatistics
Metahard - Score an answer against the truthLLM
Scale AIhard
Questions last reviewed 19 October 2026.
Roles this comes up in
Companies these come from
Other topics
- Filtering7
- Logical operators4
- Conditional logic12
- NULL handling9
- Dates16
- Joins15
- Aggregations14
- Subqueries5
- Window functions32
- Reshaping15
- Arrays6
- Strings11
- Hashing8
- Two pointers4
- Sliding window1
- Binary search4
- Sorting1
- Math3
- Lists5
- Tuples3
- Dictionaries3
- Ranking16
- Running totals10
- Deduplication2
- Chunking1
- Similarity1
- Token budget2
- Parsing4
- Backoff3
- Agent loop1
- Cost1