Click a sample to preview its source with syntax highlighting, then download it and open it in draftply (File → Open). Samples marked Pro use features the free app cannot compute — they still open and display (Pro lines carry a lock icon) and run once you start the 7-day trial. Everything else computes in full on the free version; where a sample offers a form input mask, that mask is a Pro extra.
Basics
Arithmetic, variables, labelled results, constants, built-in functions, and text with an embedded calculation.
Units, Percentages & Dates
Unit math and conversions (km/h, kg, ...), percentages, and date arithmetic.
Bit Flags, Hex & Colors
Binary/octal/hex literals and bitwise operators on two everyday problems: a Unix chmod permission mode with a umask applied, and packing/unpacking an RGB hex color.
Electronics Unit Library
Common electrical-engineering units (V, A, Ω, F with pF/nF/µF, H, siemens, mAh). Import it, then use the units inline (470 Ohm, 100 nF) or with convert.
Cooking Units
Kitchen-measure units built exactly on draftply's own volume units: tsp, tbsp, and separately named cup_us/cup_metric, since a bare "cup" would silently pick one convention.
Digital Storage & Data Rate
Byte/bit and decimal (kB/MB/GB) vs. binary (KiB/MiB/GiB) storage units, plus bps for data rates — kept strictly separate so a conversion never silently drifts.
Angle Units
Gradians, arcminutes and arcseconds on top of the built-in deg (°) and rad — they convert with in and work in sin()/cos()/tan().
RF Antenna-Gain Conversions
dbi_to_dbd()/dbd_to_dbi() — the fixed 2.15 dB offset between isotropic and dipole antenna gain, as reusable functions.
Petrol vs. Electric
A per-year cost comparison for two cars — litres and kWh carry through the math, convert shows the distance in miles, and a bar chart puts the totals side by side. Opens as a form, too.
Startup Runway
"How many months until the cash runs out?" A growing-revenue model as a function, a while loop that finds the runway month, and a plot of the balance crossing zero — with a form to try your own numbers.
Mortgage Calculator
Calculate your monthly mortgage payment, total interest paid, and see the amortization schedule over time.
Loan Comparison
Compare two loans side by side. Enter loan amount, interest rates, and terms to see monthly payments and total costs.
Savings Goal
How much do you need to save each month to reach your target? Accounts for existing savings and compound interest. Includes a growth chart.
Compound Interest
See how compound interest grows your money over time with regular deposits. Visual growth chart included.
Retirement Gap
Calculate if your savings will be enough to maintain your lifestyle in retirement. Uses the 4% rule for sustainable withdrawals.
Inflation Calculator
How much will inflation reduce the value of your money? See future purchasing power and calculate what you'll need to maintain your standard of living.
Property Tax
Calculate your annual property tax based on property value, assessment ratio, and local tax rate.
Savings Surface: Rate vs. Contribution
How much of your final balance comes from the return, and how much from just saving more? A 3D surface plots the final balance across a whole grid of rates and monthly contributions at once. Opens as a form, too.
Rent vs. Buy
Compare monthly costs of renting vs buying. Enter purchase price, down payment, mortgage rate, and rent to see when buying becomes cheaper. Form enabled.
Rent per Square Meter
Compare apartments by price per square meter. Enter rent and size for up to 3 options to find the best value.
Roof Pitch and Rafters
Pitch, span and overhang in: ridge height, rafter length, roof area and tiles to order, with tan(35°) written as on the plan. A slope in percent becomes degrees with atan(slope) in deg. Form enabled.
Moving Cost
Estimate the cost of your move based on distance, volume, floors, and number of helpers.
Energy Savings
Calculate savings from energy efficiency improvements. Enter old and new consumption, fuel price, and investment to see payback period and CO2 savings.
Solar Payback
"When has my PV system paid for itself?" Yearly savings, the exact break-even year via solve, and a plot of cumulative savings over 20 years — plus a form with the payback curve embedded.
Car Total Cost of Ownership
What does your car really cost? Calculate true cost per km and per year including fuel, insurance, maintenance, and depreciation.
Carpool Savings
Calculate how much you save by carpooling. Enter distance, fuel consumption, fuel price, and number of passengers to see savings and CO2 reduction.
Public Transport vs. Car
Compare the cost of public transport vs driving. Enter distances, ticket prices, and car costs to see which is cheaper for your commute.
EV Charging Cost
Calculate the true cost of charging an electric vehicle. Compare home charging vs public charging and vs gasoline. Includes CO2 comparison.
Road Trip Planner
Distance, average speed and departure in: driving time with a rest after every stint of 2 h 30 min, arrival time and fuel cost — then distance in mi and fuel in gal for friends abroad. Form enabled.
Fuel Detour Break-Even
Is the detour to a cheaper station worth it? Weighs the detour's own fuel cost against how much you plan to refuel and outputs the break-even price. Opens as a form, too.
Vacation Budget
Plan your vacation budget. Enter travel costs, accommodation, food, and activity expenses to see total cost and monthly savings needed. Form enabled.
Electricity Costs
Calculate how much your electrical devices really cost. Enter power consumption, daily usage, and electricity price to see daily, monthly, and yearly costs.
Electricity Bill: Back-Payment Ahead?
Read your meter today and know months before the bill arrives: the reading from the last bill, today's reading and your tariff project the yearly cost, the expected back-payment or refund, and the monthly advance that would fit. Form enabled.
Utility Bill: Check Your Share
Type the landlord's yearly utility bill in line by line — costs split by floor area, water and waste by head count — and compare your share with the advance you paid. A neighbour only changes the first lines. Form enabled.
Paint and Flooring for One Room
How many tins of paint and how many square metres of flooring to buy: walls minus door and window, two coats, offcuts included. The units check every step. Form enabled.
Quit Smoking Savings
How much have you saved since you quit? Uses today and days() against your quit date to total up cigarettes avoided and cash saved, then compares that against investing the same money — a scatter chart plots cash vs. compounded value out to your projection horizon. Form enabled, with separate sections for the date, the habit cost, and the investing assumptions.
When Can I Leave Today?
Runs live: start time and breaks in, and every minute it shows how long you have worked, when you can leave, what is still to go and your flexitime balance after today. Clock times like 8:12 and durations like 7 h 48 min work as written. Form enabled.
Meeting Cost Clock
People, average hourly cost and start time — the cost of the meeting so far ticks up every minute while it runs live. Form enabled.
Work Hours Tracker
Track your actual work hours. Enter daily start/end times, breaks, and vacation days to see weekly, monthly, and yearly work hours including overtime.
Tiling Job Quote
A draft written straight to the client: labelled line items and a total. File → Export offer (a Pro feature) turns exactly this into a client-ready PDF with your company letterhead — no separate invoicing tool needed. OfferNumber, ValidUntil, CustomerName and CustomerAddress show how the recognized offer variables print automatically once set, and VatRate splits the total row into net, VAT and a bold gross total on the printed offer.
Recipe Scaler
Scale any recipe to serve any number of people. Enter original servings and desired servings, and all ingredient quantities are automatically adjusted.
Grocery Unit Price
Compare products by price per unit. Enter price and weight for up to 3 products to find the best value per 100g or per kg.
Monthly Budget Breakdown
Where does your money actually go? A named list turns straight into a pie chart — category names become the slice labels in one argument, no separate labels list. Opens as a form, too.
Map Scale & Proportions
The proportion rule-of-three on four real situations: reading a map scale, a floor plan, scaling a recipe, and mixing paint.
Training Log: CSV Import & Pace Stats
Import your own running log as CSV — or read the worked example. Total distance, overall pace, per-run pace via a loop, and a bar chart of the trend.
Functions & Logic
User-defined functions, recursion, loops, conditionals, lists and ranges.
Statistics, Finance & Matrices
Mean / median / std / correlation, pv / fv / npv / irr, matrix determinant and inverse.
Symbolic Algebra & Charts
Solve, simplify, factor, symbolic and numeric derivatives, integrals, and plots.
Interactive Form
A notebook with a form input mask — a compound-interest calculator.
Grade Distribution
How did the class actually do — not just the average? Mean, median, quartiles, a pass rate via filter, and a hist of the score distribution.
Vector2D Class: Combining Forces
Two ropes pull a crate at different angles — what's the net pull, and which way? A small class keeps a vector's x/y and its operations (add, magnitude, angle) together. Opens as a form, too.
dB & Power Converter
Power ratios and voltage ratios to dB and back, watts to dBm and back, and a rough dBm-to-S-meter reference — the conversions you reach for constantly.
QTH Locator Distance & Bearing
Great-circle distance and beam heading between two Maidenhead locators, short path and long path. Decodes the locator with ord, no lookup table needed.
AC Impedance & Phase
A measured voltage and current as complex phasors: impedance via division, magnitude and phase angle, a series impedance added on, and real/reactive power split out with conj.
Coax Cable Loss
How much of your power reaches the antenna: matched line loss, the extra loss your SWR costs, and the watts left at the feed point.
Dipole & Vertical Antenna Length
How long to cut the wire: half-wave dipole and quarter-wave vertical length from your design frequency, in metres and feet, with the end-effect factor spelled out.
Feedline Electrical Length & Quarter-Wave Transformer
Electrical length of a run of coax in degrees, how far off the nearest quarter-wave you are, and the impedance of a quarter-wave matching transformer.
L-Network Matching
Match two resistive impedances with one coil and one capacitor: network Q, both reactances, component values, and the bandwidth that comes with them.
Transmission-Line Impedance Transformation
What impedance does an arbitrary length of feedline actually present at its input, given a complex load? The exact line equation with complex numbers, plus the reflection coefficient and VSWR at the load.
Resistive Attenuator Pad
Design a matched Pi- or T-pad for a wanted attenuation and line impedance — both topologies' resistor values side by side, plus a power-dissipation check.
SWR Sweep
SWR across the band for a resonant antenna — band-edge values, the exact 2:1 bandwidth, and the curve as a chart.
Free-Space Path Loss & Satellite Link Budget
Path loss from distance and frequency, then a full link budget — EIRP, received power and your margin above the receiver's noise floor. Built for satellite and EME work.
Fresnel Zone Clearance
Line-of-sight isn't enough — how much of the first Fresnel zone does an obstacle actually eat into, and does it still clear the usual 60% planning threshold?
Cascaded Noise Figure (Friis' Formula)
What noise figure does your whole receive chain have once feedline loss and later stages are factored in — and which stage actually dominates it?
Receiver Dynamic Range (MDS, IP3, SFDR)
From noise figure and bandwidth to the minimum discernible signal, then predicted third-order intermod products and spurious-free dynamic range from a stated OIP3.
PA Efficiency & Duty Cycle Heating
Same peak power, very different heat: DC-to-RF efficiency, then average dissipation across SSB, CW and a 100%-duty digital mode on the same amplifier.
Heatsink Thermal Resistance
Will the heatsink keep the junction temperature safe? Series thermal resistance from junction to ambient, plus the reverse calculation for sizing one.
Battery Runtime (POTA / SOTA / Field Day)
Will this battery get you through the activation? Capacity, RX/TX current draw and your transmit duty cycle turn into hours and minutes of runtime.
Morse Code Converter
A .dplybundle with a reusable Morse library: encode text to Morse and decode it back, letters and digits and punctuation, both directions from one table. Opens as a form, too.
Every sample is a plain text file with a small header. The Pro flag marks samples that use functions, charts, symbolic algebra, statistics, matrices or loops — features a Pro license unlocks.