Project Workback

Work backwards from a launch date with date arithmetic, sprint planning, and cost estimates.

You have a fixed launch date and need to work backwards. This walkthrough builds a complete project workback schedule using CalcMark’s date literals, duration arithmetic, the from keyword, and rate-based cost estimates.

The complete CalcMark file is available at testdata/examples/project-workback.cm.


Key Dates #

Start by pinning the two anchors of your schedule: the launch date and today. Subtracting one date from another gives you a duration.

launch_date = Mar 15 2025
kickoff = today

Days until launch:

days_to_launch = launch_date - kickoff
Results
launch_date = Mar 15 2025Saturday, March 15, 2025
kickoff = todaySaturday, March 14, 2026
days_to_launch = launch_date - kickoff364 days

Mar 15 2025 is a date literal – CalcMark parses it directly. The today keyword resolves to the current date at runtime. Subtracting two dates produces a duration in days.

CalcMark features: Date literals (Mar 15 2025); today keyword; date subtraction producing a duration.


Phase Durations #

Break the project into phases. CalcMark understands weeks and days as duration units, and you can add them together freely.

development_time = 4 weeks
qa_time = 2 weeks
staging_time = 1 week
launch_prep = 5 days

Total planned time:

total_planned = development_time + qa_time + staging_time + launch_prep
Results
development_time = 4 weeks4 week
qa_time = 2 weeks2 week
staging_time = 1 week1 week
launch_prep = 5 days5 day
total_planned = development_time + qa_time + staging_time + launch_prep7.71 week

Durations with different units combine naturally: 4 weeks + 2 weeks + 1 week + 5 days resolves to a single duration. CalcMark normalizes the result for you.

CalcMark features: Duration literals (weeks, days); duration addition across units.


Buffer Calculation #

Subtract the total planned time from the available time to see how much slack you have.

buffer = days_to_launch - total_planned
Results
buffer = days_to_launch - total_planned310 days

A positive buffer means you have room. A negative one means you are already behind.

CalcMark features: Duration subtraction.


Working Backwards from Launch #

This is the core of a workback schedule. Subtract each phase duration from a date to get milestone start dates.

launch_prep_start = launch_date - launch_prep
staging_start = launch_prep_start - staging_time
qa_start = staging_start - qa_time
dev_start = qa_start - development_time
Results
launch_prep_start = launch_date - launch_prepMonday, March 10, 2025
staging_start = launch_prep_start - staging_timeMonday, March 3, 2025
qa_start = staging_start - qa_timeMonday, February 17, 2025
dev_start = qa_start - development_timeMonday, January 20, 2025

Subtracting a duration from a date produces a new date. You chain these to walk backwards through every phase, from launch day all the way to development kickoff.

CalcMark features: Date arithmetic (date minus duration produces a date); chained date calculations.


Sprint Planning #

With the development window defined, you can plan sprints and estimate total capacity.

num_sprints = 2
sprint_duration = 2 weeks

Points per sprint (team velocity):

team_velocity = 40
total_points = num_sprints * team_velocity
Results
num_sprints = 22
sprint_duration = 2 weeks2 week
team_velocity = 4040
total_points = num_sprints * team_velocity80

Plain arithmetic works alongside dates and durations. 2 * 40 = 80 story points across two sprints.

CalcMark features: Plain arithmetic; markdown prose between calculations.


Key Milestones #

The from keyword adds a duration to a date. Use it with today for quick relative dates, or with any calculated date for schedule milestones.

one_week_from_now = 1 week from today
two_weeks_from_now = 2 weeks from today
next_month = 1 month from today

Milestone dates calculated from schedule:

design_review = dev_start + 1 week
first_sprint_end = dev_start + 2 weeks
feature_freeze = dev_start + 3 weeks
code_complete = qa_start
Results
one_week_from_now = 1 week from todaySaturday, March 21, 2026
two_weeks_from_now = 2 weeks from todaySaturday, March 28, 2026
next_month = 1 month from todayMonday, April 13, 2026
design_review = dev_start + 1 weekMonday, January 27, 2025
first_sprint_end = dev_start + 2 weeksMonday, February 3, 2025
feature_freeze = dev_start + 3 weeksMonday, February 10, 2025
code_complete = qa_startMonday, February 17, 2025

1 week from today reads like natural language. It is equivalent to today + 1 week. You can also add durations to dates with the + operator directly.

CalcMark features: from keyword (1 week from today); date plus duration; month duration unit.


Resource Allocation #

Count your team, then multiply by phase duration to get person-weeks.

developers = 4
qa_engineers = 2
devops = 1

Person-weeks calculation (4 weeks dev, 2 weeks QA, ~2 weeks devops):

dev_person_weeks = developers * 4
qa_person_weeks = qa_engineers * 2
devops_person_weeks = devops * 2

total_person_weeks = dev_person_weeks + qa_person_weeks + devops_person_weeks
Results
developers = 44
qa_engineers = 22
devops = 11
dev_person_weeks = developers * 416
qa_person_weeks = qa_engineers * 24
devops_person_weeks = devops * 22
total_person_weeks = dev_person_weeks + qa_person_weeks + devops_person_weeks22

Simple multiplication keeps the estimate transparent. 22 person-weeks across three roles.

CalcMark features: Plain arithmetic; variable reuse.


Daily Rate Cost Estimate #

Rate literals like $800/day represent a cost per unit of time. The over keyword accumulates a rate across a duration.

dev_daily_rate = $800/day
qa_daily_rate = $700/day
devops_daily_rate = $900/day

Team cost over development phase:

dev_cost = dev_daily_rate * developers over development_time
qa_cost = qa_daily_rate * qa_engineers over qa_time
devops_cost = devops_daily_rate * devops over (staging_time + launch_prep)
Results
dev_daily_rate = $800/day800 $/day
qa_daily_rate = $700/day700 $/day
devops_daily_rate = $900/day900 $/day
dev_cost = dev_daily_rate * developers over development_time$89.6K
qa_cost = qa_daily_rate * qa_engineers over qa_time$19.6K
devops_cost = devops_daily_rate * devops over (staging_time + launch_prep)$10.8K

$800/day * 4 over 4 weeks multiplies the daily rate by the headcount, then accumulates over the duration. The result is a currency value representing total spend for that phase.

CalcMark features: Rate literals ($800/day); over keyword for rate accumulation over a duration; currency arithmetic.


Risk Assessment #

Add a contingency buffer and shift the start date earlier.

risk_buffer = 8 days
adjusted_dev_start = dev_start - risk_buffer
Results
risk_buffer = 8 days8 day
adjusted_dev_start = dev_start - risk_bufferSunday, January 12, 2025

Subtracting 8 days from a date moves it earlier. Your adjusted kickoff now accounts for unknowns.

CalcMark features: Duration literals (days); date minus duration.


Calendar Summary #

Assign meaningful names to each milestone for a clean calendar view.

project_kickoff = adjusted_dev_start
dev_complete = qa_start
qa_complete = staging_start
staging_complete = launch_prep_start
go_live = launch_date
Results
project_kickoff = adjusted_dev_startSunday, January 12, 2025
dev_complete = qa_startMonday, February 17, 2025
qa_complete = staging_startMonday, March 3, 2025
staging_complete = launch_prep_startMonday, March 10, 2025
go_live = launch_dateSaturday, March 15, 2025

Variable aliasing makes the final output readable. Each name maps to a concrete date calculated earlier.

CalcMark features: Variable aliasing for readability.


Schedule Feasibility #

Compare available time against needed time to confirm the schedule is realistic.

available_time = days_to_launch
needed_time = total_planned + risk_buffer
Results
available_time = days_to_launch364 days
needed_time = total_planned + risk_buffer8.86 week

If needed_time exceeds available_time, you need to cut scope or extend the deadline.

CalcMark features: Duration comparison; duration addition.


Features Demonstrated #

This example showcases the following CalcMark features:

  • Date literalsMar 15 2025
  • today keyword – resolves to the current date at runtime
  • Date arithmetic – subtracting dates, adding/subtracting durations from dates
  • Duration literalsweeks, days, month
  • Duration arithmetic – adding and subtracting mixed-unit durations
  • from keyword1 week from today for natural-language date offsets
  • Rate literals$800/day, $700/day
  • over keywordrate * count over duration for cost accumulation
  • Plain arithmetic – sprint velocity, person-weeks, headcount
  • Markdown prose – headings, paragraphs, and inline comments between calculations
  • Template interpolation{{variable}} to embed computed values in prose

Try It #

testdata/examples/project-workback.cm
cm testdata/examples/project-workback.cm