Methodology
Every calculation on Calculator Porch is a small, published formula. The same code runs in your browser and in an automated test suite, and the site can't be deployed unless every test passes. Each calculator's page shows a worked example computed by that same code, so the published numbers always match what the calculator does.
How results are tested
- Reference cases for every calculator: the worked examples published on its page plus hand-checked values.
- Edge cases: zero, the largest allowed values, and invalid input, which must never produce a blank or NaN result.
- Example: the 3D printing cost defaults must give a total cost of $10.85 and a price of $18.08, matching the hand calculation on that page.
Formulas by calculator
Math
add / subtract: a/b ± c/d = (a×d ± c×b) / (b×d), then simplifymultiply: a/b × c/d = (a×c) / (b×d), then simplifydivide: a/b ÷ c/d = a/b × d/c = (a×d) / (b×c)mixed number: w n/d = (w×d + n) / dsimplify: divide top and bottom by their greatest common divisor
Statistics
range size = highest − lowest + 1chance per pick = 1 ÷ range sizeunbiased draw = lowest + (random 32-bit value mod range size), redrawing values that would bias the resultno repeats = draw again whenever a number has already been picked
mean (x̄) = Σx ÷ npopulation SD (σ) = √( Σ(x − x̄)² ÷ n )sample SD (s) = √( Σ(x − x̄)² ÷ (n − 1) ) ← Bessel’s correctionvariance = SD²
Everyday Life
days = end date − start date (+1 if you count the end date)weeks = floor(days ÷ 7), remainder = days mod 7weekdays = days that fall Monday–Friday (public holidays not excluded)
age (years, months) = the most whole calendar months from the birth date that fit before the "age on" dateage (days) = days from that month-anniversary to the "age on" dateadding a month keeps the day of the month, or the last day of a shorter month (Jan 31 + 1 month = Feb 28 or 29)age in days = days between the two dates, counting every February 29 in betweenleap year: divisible by 4, except century years, which must be divisible by 400 (2000 yes, 1900 no)
Construction
rectangle = length × widthcircle = π × (diameter ÷ 2)²triangle = base × height ÷ 2sq yd = sq ft ÷ 9 sq m = sq ft ÷ 10.7639 acres = sq ft ÷ 43,560
volume (cu ft) = area (sq ft) × depth (in) ÷ 12 × (1 + waste %)cubic yards = cu ft ÷ 27tons = cubic yards × weight (tons per cubic yard)bags = cu ft ÷ 0.5 (rounded up)cost = tons × price per ton + delivery fee
Finance
Percent Off and Percentage Calculator
savings = price × percent off ÷ 100sale price = price − savings = price × (1 − percent off ÷ 100)with tax = sale price × (1 + tax rate ÷ 100)P% of X = X × P ÷ 100X is what % of Y = X ÷ Y × 100X is P% of what = X × 100 ÷ Ppercentage change = (new − old) ÷ |old| × 100percentage difference = |a − b| ÷ ((a + b) ÷ 2) × 100
tip = bill × tip % ÷ 100total = bill + tipper person = total ÷ number of people
material = grams ÷ spool grams × spool priceelectricity = watts ÷ 1000 × hours × (¢/kWh ÷ 100)machine = hours × (printer price ÷ lifetime hours + maintenance per hour)failure share = run cost ÷ (1 − failure rate) − run costtotal cost = material + electricity + machine + failure share + labor + extrasprice = (total cost + fixed fees) ÷ (1 − margin − fee %)
price per gram of 24K = rate ÷ grams in the rate unit ÷ (rate karat ÷ 24)price per gram at your karat = price per gram of 24K × karat ÷ 24gold value = gold weight (g) × price per gram at your karatjewellery price = (gold value + wastage + making + other charges) × (1 + tax %)old gold payout = gold value − deduction1 tola = 180 grains = 11.6638 g; 1 tola = 12 masha = 96 ratti; 1 troy ounce = 31.1035 g
Energy & Solar
monthly kWh = units on your bill ÷ days in the billing period × 30.42,or bill amount ÷ price per unit (same period),or Σ appliances (qty × watts × hours a day) × 30.42 days ÷ 1,000daily need (kWh) = monthly kWh × 12 ÷ 365 × share to coverkWh per kW per day = peak sun hours × (1 − losses)system size (kW) = daily need ÷ kWh per kW per daypanels = size × 1,000 ÷ panel watts, rounded upyearly output (kWh) = panels × panel watts ÷ 1,000 × kWh per kW per day × 365panel area (m²) = system kW ÷ panel efficiencypanels on your roof = roof area ÷ (panel watts ÷ 1,000 ÷ efficiency), rounded downdarkest-month sizing = daily need ÷ (the lowest monthly sun hours × (1 − losses))battery, backup = daily use × share kept running × backup hours ÷ 24 ÷ efficiency ÷ depth of dischargebattery, off-grid = daily use × cloudy days ÷ efficiency ÷ depth of discharge, in whole modulesinverter (kW) = system kW ÷ 1.2, or your peak load if largeryearly savings = kWh you use × price + kWh exported × export credittypical cost = system watts × typical price per watt (+ battery kWh × typical price per kWh, US only)your own prices = watts × (panels + mounting and labour per watt) + inverter kW × price per kW + battery kWh × price per kWh + otherpayback (years) = installed cost ÷ yearly savings25-year savings = Σ yearly savings × (1 − 0.5%)^year, at today's prices
Pets
from mating: due = mating date + 63 days (normal window: day 56–68)from ovulation: due = ovulation date + 63 days (window day 62–64)from LH surge: due = LH surge date + 65 days (window day 64–66)two matings: window runs from first mating + 56 to last mating + 68
Data sources
- Electricity prices: U.S. Energy Information Administration, Electric Power Monthly Table 5.6.A, residential average price by state, July 2026 (retrieved 2026-10-04). Public-domain US government data, refreshed quarterly.
- Every other constant is cited on the page that uses it, with the date it was checked.
Corrections
Found an error? Email contact@calculatorporch.com with the page and the link from “Copy link”. Fixes are logged below with dates. See also the editorial policy.
Changelog
- : 13 calculators added across 7 categories.
Last updated