Window Quote Calculator

Give your window company website a configurator that prices like your plant does. The homeowner describes up to three kinds of windows, each with width and height in inches, quantity, style (double-hung, single-hung, slider, casement, awning, picture, twin double-hung or picture with flankers), frame color, double- or triple-pane Low-E glass, obscure or tinted glass, grids between the glass, screen, tempered glass and exterior brickmould. Hardware finish, replacement or new-construction frame type, ENERGY STAR glass, installation, haul-away and delivery apply to the whole order. Prices are per window by style and united inches with percentage and per-window surcharges, a volume discount, an optional promotion and a minimum order, and the visitor downloads a PDF estimate.

Home Services

Try the Calculator

Vinyl Window Estimate
Build your windows one kind at a time: size in inches, style, color and glass, with a per-window price. Within 3 business days we come out for a free in-home measure and confirm every size.
Step 1 of 3: Your windows
 
Window 1
 
 
 
United inches: 96 (+$5 per inch above 72)
 
Step 2 of 3: Hardware and installation
 
 
Volume discount: from 6 windows, 7% off the windows and the installation. You have 1 so far.
Step 3 of 3: Your estimate
We come out for a free in-home measure within 3 business days, and your windows are made to order in 4 weeks from the signed order.
What makes up the price
Window 1: 1 x double-hung 36 x 60 in, white, double-pane, clear low-e, half screen - $532 each
$ 532
+
$ 0
+
$ 190
+
$ 149

$ 871
installed, before sales tax
Financing available: 0% APR for 12 months on approved credit.
Contact details
 
 
 
 
Summary
$ 871
installed
Estimate before sales tax. A firm quote follows the free in-home measure.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
export function windowQuoteCalculator(form: FormTs) {
// Base price per white vinyl window, double-pane Low-E argon glass, half screen, no installation
const stylePrices: Record<string, number> = {
'double-hung': 385,
'single-hung': 335,
'slider': 365,
'casement': 495,
'awning': 455,
'picture': 295
};
 
// Size: united inches (width + height) included in the base price, then a rate per extra united inch
const unitedInchesIncluded = 72;
const unitedInchRate = 4.5;
const mullJoint = 60; // factory mulling of two lites into one frame
 
// Percentage surcharges on the window price
const triplePanePct = 20;
const energyStarPct = 8;
const tanFramesPct = 10;
const capstockPct = 22; // black or bronze exterior over a white interior
 
// Per-window options
const obscureGlass = 55;
const tintedGlass = 65;
const temperedGlass = 95;
const gridsBetweenGlass = 70;
const coloredHardware = 30; // per operating window
const fullScreen = 35; // instead of the half screen on hung windows and sliders
const brickmouldPerFoot = 6.5;
 
// Installation and delivery
const installPocketEach = 165; // replacement: pocket install into the existing frame
const installFinEach = 285; // new construction: nailing fin, flashing, J-channel
const haulAwayEach = 25;
const deliveryFlat = 149;
 
// Discounts and limits
const volumeDiscountFrom = 6; // windows
const volumeDiscountPct = 7;
const promotionPct = 0; // set above 0 to show the promotion banner
const promotionName = 'Spring window sale';
const minimumOrder = 750;
 
// Promises printed on the estimate
const measureDays = 3;
const leadWeeks = 4;
const estimateValidDays = 30;
const financingNote = 'Financing available: 0% APR for 12 months on approved credit.';
const climateZone = 'North-Central (U-factor 0.25 or lower)';
 
const MAX_KINDS = 3;
 
type Style = { name: string; lites: { style: string; share: number }[]; opens: boolean; cranks: boolean };
 
// Every style the plant makes and how it is priced: lite by lite
const styles: Record<string, Style> = {
'double-hung': { name: 'Double-hung', lites: [{ style: 'double-hung', share: 1 }], opens: true, cranks: false },
'single-hung': { name: 'Single-hung', lites: [{ style: 'single-hung', share: 1 }], opens: true, cranks: false },
'slider': { name: 'Horizontal slider', lites: [{ style: 'slider', share: 1 }], opens: true, cranks: false },
'casement': { name: 'Casement', lites: [{ style: 'casement', share: 1 }], opens: true, cranks: true },
'awning': { name: 'Awning', lites: [{ style: 'awning', share: 1 }], opens: true, cranks: true },
'picture': { name: 'Picture (fixed)', lites: [{ style: 'picture', share: 1 }], opens: false, cranks: false },
'twin-double-hung': { name: 'Twin double-hung', lites: [{ style: 'double-hung', share: 0.5 }, { style: 'double-hung', share: 0.5 }], opens: true, cranks: false },
'picture-flankers': { name: 'Picture with flankers', lites: [{ style: 'double-hung', share: 0.25 }, { style: 'picture', share: 0.5 }, { style: 'double-hung', share: 0.25 }], opens: true, cranks: false }
};
 
const colorNames: Record<string, string> = { 'white': 'White', 'tan': 'Tan', 'black': 'Black exterior', 'bronze': 'Bronze exterior' };
const glassNames: Record<string, string> = { 'clear': 'Clear Low-E', 'obscure': 'Obscure', 'tinted': 'Tinted' };
const gridNames: Record<string, string> = { 'none': 'none', 'colonial': 'colonial grids', 'prairie': 'prairie grids' };
const screenNames: Record<string, string> = { 'half': 'half screen', 'full': 'full screen', 'none': 'no screen' };
const hardwareNames: Record<string, string> = { 'white': 'White', 'nickel': 'Brushed nickel', 'bronze': 'Oil-rubbed bronze', 'black': 'Matte black' };
 
const money = (amount: number) => {
const rounded = Math.round(Math.abs(amount));
const digits = String(rounded).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return (amount < 0 ? '-$' : '$') + digits;
};
const defaultStyle: Style = { name: 'Double-hung', lites: [{ style: 'double-hung', share: 1 }], opens: true, cranks: false };
const styleOf = (id: string): Style => styles[id] ?? defaultStyle;
const priceOf = (style: string): number => stylePrices[style] ?? 0;
const nameOf = (names: Record<string, string>, id: string): string => names[id] ?? id;
 
form.addRow(row => {
row.addTextPanel('header', {
computedValue: () => 'Vinyl Window Estimate',
customStyles: { 'font-size': '1.5rem', 'font-weight': '600', 'color': '#1e293b' }
});
});
 
form.addRow(row => {
row.addTextPanel('intro', {
computedValue: () => 'Build your windows one kind at a time: size in inches, style, color and glass, with a per-window price. Within '
+ measureDays + ' business days we come out for a free in-home measure and confirm every size.',
customStyles: { 'font-size': '0.95rem', 'color': '#475569' }
});
});
 
form.addSpacer({ height: 16 });
 
const pages = form.addPages('steps');
 
// Step 1: the windows, every kind on its own card
const windowsPage = pages.addPage('windows');
 
windowsPage.addRow(row => {
row.addTextPanel('stepTitle', {
computedValue: () => 'Step 1 of 3: Your windows',
customStyles: { 'font-size': '1.1rem', 'font-weight': '600', 'color': '#1e293b' }
});
});
 
windowsPage.addRow(row => {
row.addInteger('kinds', {
label: 'How many different windows do you need?',
tooltip: 'Windows of the same size, style and options are one kind: set the quantity on the card',
min: 1,
max: MAX_KINDS,
defaultValue: 1,
isRequired: true
}, '1fr');
row.addEmpty('1fr');
});
 
const kindCount = () => windowsPage.integer('kinds')?.value() || 1;
 
type WindowLine = {
number: number; style: string; width: number; height: number; quantity: number; color: string;
triplePane: boolean; glass: string; grids: string; screen: string; tempered: boolean; brickmould: boolean;
};
 
// Starting width x height of each card, inches
const defaultSizes: [number, number][] = [[36, 60], [32, 54], [48, 48]];
 
const cards = defaultSizes.map(([defaultWidth, defaultHeight], index) => {
const i = index + 1;
const card = windowsPage.addSubform('window' + i, {
title: 'Window ' + i,
isCollapsible: true,
isVisible: () => kindCount() >= i
});
 
const defaults: [number, number] = [defaultWidth, defaultHeight];
const cardStyle = () => card.dropdown('style')?.value() || 'double-hung';
 
card.addRow(row => {
row.addDropdown('style', {
label: 'Style',
options: [
{ id: 'double-hung', name: 'Double-hung - from ' + money(priceOf('double-hung')) },
{ id: 'single-hung', name: 'Single-hung - from ' + money(priceOf('single-hung')) },
{ id: 'slider', name: 'Horizontal slider - from ' + money(priceOf('slider')) },
{ id: 'casement', name: 'Casement (crank-out) - from ' + money(priceOf('casement')) },
{ id: 'awning', name: 'Awning (hinged at top) - from ' + money(priceOf('awning')) },
{ id: 'picture', name: 'Picture (fixed) - from ' + money(priceOf('picture')) },
{ id: 'twin-double-hung', name: 'Twin double-hung - from ' + money(2 * priceOf('double-hung') + mullJoint) },
{ id: 'picture-flankers', name: 'Picture with flankers - from ' + money(priceOf('picture') + 2 * priceOf('double-hung') + 2 * mullJoint) }
],
defaultValue: 'double-hung',
isRequired: true
}, '2fr');
row.addInteger('quantity', {
label: 'Quantity',
min: 1,
max: 20,
defaultValue: 1,
isRequired: true
}, '1fr');
});
 
card.addRow(row => {
row.addInteger('width', {
label: 'Width (inches)',
min: 18,
max: 144,
defaultValue: defaults[0],
isRequired: true
}, '1fr');
row.addInteger('height', {
label: 'Height (inches)',
min: 18,
max: 78,
defaultValue: defaults[1],
isRequired: true
}, '1fr');
row.addTextPanel('unitedInches', {
computedValue: () => {
const ui = (card.integer('width')?.value() || defaults[0]) + (card.integer('height')?.value() || defaults[1]);
return 'United inches: ' + ui + (ui > unitedInchesIncluded ? ' (+' + money(unitedInchRate) + ' per inch above ' + unitedInchesIncluded + ')' : ' (within base size)');
},
customStyles: { 'font-size': '0.85rem', 'color': '#64748b', 'padding-top': '28px' }
}, '1fr');
});
 
card.addRow(row => {
row.addDropdown('color', {
label: 'Frame color',
options: [
{ id: 'white', name: 'White, inside and out (included)' },
{ id: 'tan', name: 'Tan, inside and out (+' + tanFramesPct + '%)' },
{ id: 'black', name: 'Black exterior, white inside (+' + capstockPct + '%)' },
{ id: 'bronze', name: 'Bronze exterior, white inside (+' + capstockPct + '%)' }
],
defaultValue: 'white',
isRequired: true
}, '1fr');
row.addDropdown('glazing', {
label: 'Glass package',
options: [
{ id: 'double', name: 'Double-pane Low-E, argon (included)' },
{ id: 'triple', name: 'Triple-pane Low-E, two argon spaces (+' + triplePanePct + '%)' }
],
defaultValue: 'double',
isRequired: true
}, '1fr');
});
 
card.addRow(row => {
row.addDropdown('glass', {
label: 'Glass',
options: [
{ id: 'clear', name: 'Clear Low-E (included)' },
{ id: 'obscure', name: 'Obscure privacy glass (+' + money(obscureGlass) + ')' },
{ id: 'tinted', name: 'Gray solar tint (+' + money(tintedGlass) + ')' }
],
defaultValue: 'clear',
isRequired: true
}, '1fr');
row.addDropdown('grids', {
label: 'Grids between the glass',
options: [
{ id: 'none', name: 'No grids (included)' },
{ id: 'colonial', name: 'Colonial (+' + money(gridsBetweenGlass) + ')' },
{ id: 'prairie', name: 'Prairie (+' + money(gridsBetweenGlass) + ')' }
],
defaultValue: 'none',
isRequired: true
}, '1fr');
});
 
card.addRow(row => {
row.addRadioButton('screen', {
label: 'Insect screen',
tooltip: 'Casements and awnings always come with a full screen at no charge',
options: [
{ id: 'half', name: 'Half screen (included)' },
{ id: 'full', name: 'Full screen (+' + money(fullScreen) + ' on hung windows and sliders)' },
{ id: 'none', name: 'No screen' }
],
defaultValue: 'half',
orientation: 'horizontal',
isVisible: () => cardStyle() !== 'picture'
});
});
 
card.addRow(row => {
row.addCheckbox('tempered', {
label: 'Tempered safety glass (+' + money(temperedGlass) + ') - required near tubs, showers, doors and glass close to the floor',
defaultValue: false
}, '1fr');
row.addCheckbox('brickmould', {
label: 'Exterior brickmould casing (+' + money(brickmouldPerFoot) + ' per ft of perimeter)',
defaultValue: false
}, '1fr');
});
 
// Every field read through its default, so the estimate never waits for input
const line = (): WindowLine => {
const style = cardStyle();
let screen = style === 'picture' ? 'none' : (card.radioButton('screen')?.value() || 'half');
if (styleOf(style).cranks && screen === 'half') screen = 'full';
return {
number: i,
style,
width: card.integer('width')?.value() || defaultWidth,
height: card.integer('height')?.value() || defaultHeight,
quantity: card.integer('quantity')?.value() || 1,
color: card.dropdown('color')?.value() || 'white',
triplePane: card.dropdown('glazing')?.value() === 'triple',
glass: card.dropdown('glass')?.value() || 'clear',
grids: card.dropdown('grids')?.value() || 'none',
screen,
tempered: card.checkbox('tempered')?.value() === true,
brickmould: card.checkbox('brickmould')?.value() === true
};
};
 
return { number: i, line };
});
 
const windowList = (): WindowLine[] => cards.filter(c => c.number <= kindCount()).map(c => c.line());
 
const windowCount = () => windowList().reduce((sum, w) => sum + w.quantity, 0);
 
// Step 2: hardware, frame type and installation for the whole order
const installPage = pages.addPage('install');
 
installPage.addRow(row => {
row.addTextPanel('stepTitle', {
computedValue: () => 'Step 2 of 3: Hardware and installation',
customStyles: { 'font-size': '1.1rem', 'font-weight': '600', 'color': '#1e293b' }
});
});
 
installPage.addRow(row => {
row.addRadioButton('hardware', {
label: 'Hardware finish (cam locks, tilt latches and cranks on every operating window)',
options: [
{ id: 'white', name: 'White - matches the frame (included)' },
{ id: 'nickel', name: 'Brushed nickel (+' + money(coloredHardware) + '/window)' },
{ id: 'bronze', name: 'Oil-rubbed bronze (+' + money(coloredHardware) + '/window)' },
{ id: 'black', name: 'Matte black (+' + money(coloredHardware) + '/window)' }
],
defaultValue: 'white',
orientation: 'vertical',
isRequired: true
}, '1fr');
row.addRadioButton('frameType', {
label: 'Frame type',
tooltip: 'Not sure? Leave replacement; the measure confirms the frames',
options: [
{ id: 'replacement', name: 'Replacement - pocket frame into the existing opening (install ' + money(installPocketEach) + '/window)' },
{ id: 'new-construction', name: 'New construction - nailing fin, flashed to the sheathing (install ' + money(installFinEach) + '/window)' }
],
defaultValue: 'replacement',
orientation: 'vertical',
isRequired: true
}, '1fr');
});
 
installPage.addRow(row => {
row.addCheckbox('energyStar', {
label: 'ENERGY STAR certified glass for the ' + climateZone + ' climate zone (+' + energyStarPct + '%) - may qualify for utility rebates and the federal tax credit',
defaultValue: true
});
});
 
const frameType = () => installPage.radioButton('frameType')?.value() || 'replacement';
const withInstall = () => installPage.checkbox('install')?.value() === true;
 
installPage.addRow(row => {
row.addCheckbox('install', {
label: 'Installation by our own crews',
defaultValue: true
}, '1fr');
row.addCheckbox('haulAway', {
label: 'Haul away the old windows (+' + money(haulAwayEach) + '/window)',
defaultValue: true,
isVisible: () => withInstall() && frameType() === 'replacement'
}, '1fr');
row.addCheckbox('delivery', {
label: 'Delivery (' + money(deliveryFlat) + ' for the whole order)',
defaultValue: true
}, '1fr');
});
 
installPage.addRow(row => {
row.addTextPanel('volumeInfo', {
computedValue: () => {
const count = windowCount();
if (count >= volumeDiscountFrom) return 'Volume discount: ' + volumeDiscountPct + '% off the windows and the installation is already in your price (' + count + ' windows).';
return 'Volume discount: from ' + volumeDiscountFrom + ' windows, ' + volumeDiscountPct + '% off the windows and the installation. You have ' + count + ' so far.';
},
customStyles: { 'font-size': '0.9rem', 'color': '#0369a1', 'background': '#e0f2fe', 'padding': '10px', 'border-radius': '6px' }
});
});
 
const hardware = () => installPage.radioButton('hardware')?.value() || 'white';
const energyStar = () => installPage.checkbox('energyStar')?.value() === true;
const withHaul = () => withInstall() && frameType() === 'replacement' && installPage.checkbox('haulAway')?.value() === true;
const withDelivery = () => installPage.checkbox('delivery')?.value() === true;
 
// Pricing
// One lite: the base price of its style, plus every united inch above the included size
const litePrice = (style: string, width: number, height: number): number => {
const united = Math.round(width) + Math.round(height);
return (stylePrices[style] || 0) + Math.max(0, united - unitedInchesIncluded) * unitedInchRate;
};
 
// Price of one window of the kind: the lites and the mulls, then the percentage surcharges
const windowEach = (w: WindowLine): number => {
const s = styleOf(w.style);
let price = s.lites.reduce((sum, lite) => sum + litePrice(lite.style, w.width * lite.share, w.height), 0) + (s.lites.length - 1) * mullJoint;
if (w.triplePane) price *= 1 + triplePanePct / 100;
if (energyStar()) price *= 1 + energyStarPct / 100;
if (w.color === 'tan') price *= 1 + tanFramesPct / 100;
if (w.color === 'black' || w.color === 'bronze') price *= 1 + capstockPct / 100;
return Math.round(price);
};
 
// Options of one window of the kind: glass, grids, hardware, screen, tempered glass and brickmould
const optionsEach = (w: WindowLine): number => {
const s = styleOf(w.style);
let sum = 0;
if (w.glass === 'obscure') sum += obscureGlass;
if (w.glass === 'tinted') sum += tintedGlass;
if (w.grids !== 'none') sum += gridsBetweenGlass;
if (s.opens && hardware() !== 'white') sum += coloredHardware;
if (w.screen === 'full' && !s.cranks) sum += fullScreen;
if (w.tempered) sum += temperedGlass;
if (w.brickmould) sum += brickmouldPerFoot * (2 * (w.width + w.height)) / 12;
return Math.round(sum);
};
 
const windowsCost = () => windowList().reduce((sum, w) => sum + windowEach(w) * w.quantity, 0);
const optionsCost = () => windowList().reduce((sum, w) => sum + optionsEach(w) * w.quantity, 0);
const installEach = () => (frameType() === 'replacement' ? installPocketEach : installFinEach) + (withHaul() ? haulAwayEach : 0);
const installCost = () => withInstall() ? installEach() * windowCount() : 0;
const deliveryCost = () => withDelivery() ? deliveryFlat : 0;
const volumeDiscount = () => windowCount() >= volumeDiscountFrom ? Math.round((windowsCost() + installCost()) * volumeDiscountPct / 100) : 0;
const beforePromotion = () => windowsCost() + optionsCost() + installCost() + deliveryCost() - volumeDiscount();
const promotion = () => Math.round(beforePromotion() * promotionPct / 100);
// The minimum holds last: a promotion may never take an order below the minimum
const minimumApplied = () => beforePromotion() - promotion() < minimumOrder;
const total = () => Math.max(beforePromotion() - promotion(), minimumOrder);
 
const describeOptions = (w: WindowLine): string => {
const parts = [nameOf(colorNames, w.color).toLowerCase(), w.triplePane ? 'triple-pane' : 'double-pane', nameOf(glassNames, w.glass).toLowerCase()];
if (w.grids !== 'none') parts.push(nameOf(gridNames, w.grids));
if (w.style !== 'picture') parts.push(nameOf(screenNames, w.screen));
if (w.tempered) parts.push('tempered');
if (w.brickmould) parts.push('brickmould');
return parts.join(', ');
};
 
const describeInstall = (): string => {
if (!withInstall()) return 'windows only, customer installs';
return (frameType() === 'replacement' ? 'replacement (pocket) install' : 'new-construction (nailing fin) install') + (withHaul() ? ', haul-away' : '');
};
 
// Step 3: the estimate and the contact details
const quotePage = pages.addPage('quote');
 
quotePage.addRow(row => {
row.addTextPanel('stepTitle', {
computedValue: () => 'Step 3 of 3: Your estimate',
customStyles: { 'font-size': '1.1rem', 'font-weight': '600', 'color': '#1e293b' }
});
});
 
quotePage.addRow(row => {
row.addTextPanel('promotionBanner', {
computedValue: () => promotionName + ': ' + promotionPct + '% off is already in the price below, ' + money(promotion()) + ' less on this order.',
isVisible: () => promotion() > 0,
customStyles: { 'font-size': '0.95rem', 'font-weight': '600', 'color': '#166534', 'background': '#dcfce7', 'padding': '10px', 'border-radius': '6px' }
});
});
 
quotePage.addRow(row => {
row.addTextPanel('timing', {
computedValue: () => 'We come out for a free in-home measure within ' + measureDays + ' business days, and your windows are made to order in ' + leadWeeks + ' weeks from the signed order.',
customStyles: { 'font-size': '0.9rem', 'color': '#0369a1', 'background': '#e0f2fe', 'padding': '10px', 'border-radius': '6px' }
});
});
 
const summarySection = quotePage.addSubform('summary', { title: 'What makes up the price', isCollapsible: false });
 
cards.forEach(c => {
summarySection.addRow(row => {
row.addTextPanel('line' + c.number, {
computedValue: () => {
if (kindCount() < c.number) return '';
const w = c.line();
return 'Window ' + c.number + ': ' + w.quantity + ' x ' + styleOf(w.style).name.toLowerCase() + ' ' + w.width + ' x ' + w.height + ' in, ' + describeOptions(w)
+ ' - ' + money(windowEach(w)) + ' each' + (optionsEach(w) > 0 ? ' + ' + money(optionsEach(w)) + ' options' : '');
},
isVisible: () => kindCount() >= c.number,
customStyles: { 'font-size': '0.9rem', 'color': '#334155' }
});
});
});
 
summarySection.addRow(row => {
row.addPriceDisplay('windowsCost', {
label: 'Windows',
computedValue: () => windowsCost(),
decimals: 0,
variant: 'default'
}, '1fr');
row.addPriceDisplay('optionsCost', {
label: 'Options',
computedValue: () => optionsCost(),
decimals: 0,
variant: 'default',
prefix: '+'
}, '1fr');
});
 
summarySection.addRow(row => {
row.addPriceDisplay('installCost', {
label: () => 'Installation (' + describeInstall() + ')',
computedValue: () => installCost(),
decimals: 0,
variant: 'default',
prefix: '+'
}, '1fr');
row.addPriceDisplay('deliveryCost', {
label: () => withDelivery() ? 'Delivery' : 'Delivery (customer pickup)',
computedValue: () => deliveryCost(),
decimals: 0,
variant: 'default',
prefix: '+'
}, '1fr');
});
 
summarySection.addRow(row => {
row.addPriceDisplay('volumeDiscount', {
label: 'Volume discount (' + volumeDiscountPct + '% from ' + volumeDiscountFrom + ' windows)',
computedValue: () => -volumeDiscount(),
decimals: 0,
variant: 'success',
isVisible: () => volumeDiscount() > 0
}, '1fr');
row.addPriceDisplay('promotion', {
label: promotionName,
computedValue: () => -promotion(),
decimals: 0,
variant: 'success',
isVisible: () => promotion() > 0
}, '1fr');
row.addPriceDisplay('minimum', {
label: 'Minimum order (' + money(minimumOrder) + ')',
computedValue: () => total() - (beforePromotion() - promotion()),
decimals: 0,
variant: 'default',
prefix: '+',
isVisible: () => minimumApplied()
}, '1fr');
});
 
summarySection.addSpacer({ showLine: true, lineStyle: 'solid', lineColor: '#e2e8f0' });
 
summarySection.addRow(row => {
row.addPriceDisplay('total', {
label: 'Estimated price',
computedValue: () => total(),
decimals: 0,
variant: 'large',
suffix: () => ' ' + (withInstall() ? 'installed' : 'windows only') + ', before sales tax'
});
});
 
summarySection.addRow(row => {
row.addTextPanel('financing', {
computedValue: () => financingNote,
customStyles: { 'font-size': '0.9rem', 'color': '#334155', 'background': '#f1f5f9', 'padding': '10px', 'border-radius': '6px' }
});
});
 
const contactSection = quotePage.addSubform('contact', { title: 'Contact details', isCollapsible: false });
 
contactSection.addRow(row => {
row.addTextbox('name', {
label: 'Name',
placeholder: 'John Smith',
isRequired: true
}, '1fr');
row.addTextbox('phone', {
label: 'Phone',
placeholder: '(555) 123-4567',
isRequired: true
}, '1fr');
});
 
contactSection.addRow(row => {
row.addEmail('email', {
label: 'E-mail',
tooltip: 'We send the PDF estimate to this address',
placeholder: 'john@example.com',
isRequired: true
}, '1fr');
row.addTextbox('cityZip', {
label: 'City, state and ZIP code',
placeholder: 'Columbus, OH 43228',
tooltip: 'Where we come out to measure',
isRequired: true
}, '1fr');
});
 
contactSection.addRow(row => {
row.addTextarea('notes', {
label: 'Anything else?',
placeholder: 'E.g. an arched window, HOA color rules, a second-floor window, days that work for the measure',
rows: 3,
maxLength: 1500
});
});
 
// Sticky total under every step
const finalSection = form.addSubform('final', {
title: 'Summary',
isCollapsible: false,
sticky: 'bottom'
});
 
finalSection.addRow(row => {
row.addPriceDisplay('totalEstimate', {
label: () => windowCount() + (windowCount() === 1 ? ' window' : ' windows') + ', estimated price',
computedValue: () => total(),
decimals: 0,
variant: 'large',
suffix: () => ' ' + (withInstall() ? 'installed' : 'windows only')
});
});
 
finalSection.addRow(row => {
row.addTextPanel('disclaimer', {
computedValue: () => 'Estimate before sales tax. A firm quote follows the free in-home measure.',
customStyles: { 'font-size': '0.85rem', 'color': '#94a3b8', 'font-style': 'italic' }
});
});
 
// PDF estimate
form.configurePdf('estimate', pdf => {
const list = windowList();
const count = windowCount();
 
pdf.configure({
filename: 'window-estimate',
pageSize: 'Letter',
allowUserDownload: true,
downloadButtonLabel: 'Download the PDF estimate',
header: {
title: 'Vinyl window estimate',
subtitle: count + (count === 1 ? ' window' : ' windows') + ' in ' + list.length + (list.length === 1 ? ' kind' : ' kinds')
},
footer: { text: 'Estimate only. A firm quote follows the free in-home measure.', showPageNumbers: true }
});
 
pdf.addSection('Prepared for', section => {
section.addRow(row => row
.addField('Name', contactSection.textbox('name')?.value() || '')
.addField('Phone', contactSection.textbox('phone')?.value() || '')
.addField('E-mail', contactSection.email('email')?.value() || '')
.addField('Location', contactSection.textbox('cityZip')?.value() || ''));
});
 
pdf.addSection('Summary', section => {
const rows: string[][] = list.map(w => [
'Window ' + w.number + ': ' + w.width + ' x ' + w.height + ' in, ' + styleOf(w.style).name.toLowerCase() + ', ' + nameOf(colorNames, w.color).toLowerCase(),
String(w.quantity),
money(windowEach(w)),
money(windowEach(w) * w.quantity)
]);
rows.push(['Options: glass, grids, hardware, screens, tempered glass, brickmould', '', '', optionsCost() > 0 ? money(optionsCost()) : 'none']);
rows.push(['Installation, ' + describeInstall(), withInstall() ? String(count) : '', withInstall() ? money(installEach()) : '', withInstall() ? money(installCost()) : 'windows only']);
rows.push(['Delivery', '', '', withDelivery() ? money(deliveryCost()) : 'customer pickup']);
if (volumeDiscount() > 0) rows.push(['Volume discount ' + volumeDiscountPct + '% from ' + volumeDiscountFrom + ' windows', '', '', '-' + money(volumeDiscount())]);
if (promotion() > 0) rows.push([promotionName + ' ' + promotionPct + '%', '', '', '-' + money(promotion())]);
if (minimumApplied()) rows.push(['Minimum order', '', '', money(total() - (beforePromotion() - promotion()))]);
rows.push(['Total before sales tax', '', '', money(total())]);
section.addTable(['Item', 'Qty', 'Each', 'Amount'], rows);
section.addText('Estimated price: ' + money(total()) + ', ' + (withInstall() ? 'installed' : 'windows only') + ', before sales tax. ' + financingNote);
});
 
pdf.addSection('Window specifications', section => {
list.forEach((w, index) => {
const s = styleOf(w.style);
section.addText('Window ' + w.number + ' - ' + w.quantity + (w.quantity === 1 ? ' pc' : ' pcs'));
section.addRow(row => row
.addField('Size', w.width + ' x ' + w.height + ' in')
.addField('United inches', String(Math.round(w.width) + Math.round(w.height)))
.addField('Style', s.name)
.addField('Frame color', nameOf(colorNames, w.color)));
section.addRow(row => row
.addField('Glass package', w.triplePane ? 'triple-pane Low-E, two argon spaces' : 'double-pane Low-E, argon')
.addField('Glass', nameOf(glassNames, w.glass) + (w.tempered ? ', tempered' : ''))
.addField('Grids', w.grids === 'none' ? 'none' : nameOf(gridNames, w.grids) + ', between the glass')
.addField('Screen', w.style === 'picture' ? '-' : nameOf(screenNames, w.screen)));
section.addRow(row => row
.addField('Brickmould', w.brickmould ? 'yes, ' + (2 * (w.width + w.height) / 12).toFixed(1) + ' ft' : 'no')
.addField('Hardware', s.opens ? nameOf(hardwareNames, hardware()) : 'none, fixed window')
.addField('Price per window', money(windowEach(w)) + (optionsEach(w) > 0 ? ' + ' + money(optionsEach(w)) + ' options' : '')));
if (index < list.length - 1) section.addDivider();
});
});
 
pdf.addSection('Shared by the whole order', section => {
section.addRow(row => row
.addField('Frame type', frameType() === 'replacement' ? 'Replacement (pocket frame)' : 'New construction (nailing fin)')
.addField('ENERGY STAR', energyStar() ? 'yes, ' + climateZone : 'no')
.addField('Installation', withInstall() ? describeInstall() + ', ' + money(installEach()) + ' per window' : 'windows only')
.addField('Delivery', withDelivery() ? 'yes, ' + money(deliveryFlat) : 'customer pickup'));
});
 
pdf.addSection('What happens next', section => {
section.addText('1. A consultant calls within one business day to go over the configuration.');
section.addText('2. We book your free in-home measure within ' + measureDays + ' business days; after it you get a firm quote.');
section.addText('3. Your windows are made to order in ' + leadWeeks + ' weeks from the signed order; installation takes one day for most homes.');
});
 
const notes = contactSection.textarea('notes')?.value();
if (notes) {
pdf.addSection('Notes', section => section.addText(notes));
}
 
pdf.addSection('Terms', section => {
section.addText('Prices are before sales tax. This estimate is valid for ' + estimateValidDays + ' days from its date. It is not a binding offer: the final price depends on the in-home measure, which confirms sizes, frame condition and installation type. A firm quote in writing follows the measure.');
});
});
 
form.configureSubmitButton({ label: 'Send and get my estimate' });
 
form.configureCompletionScreen({
type: 'text',
title: 'Thank you!',
message: 'Your estimate is ready to download. A consultant calls within one business day, and we come out for your free in-home measure within ' + measureDays + ' business days.'
});
}
 

Frequently Asked Questions

How are the window prices calculated?

Each style has a base price for a white vinyl window up to 72 united inches (width plus height). Every united inch above that adds a per-inch rate, and a twin or a picture with flankers is priced lite by lite plus the mull joints. Glass package, ENERGY STAR and frame color are percentage surcharges; glass type, grids, hardware, screens, tempered glass and brickmould are per-window options. All of these are constants at the top of the code.

Can I change the styles and options my plant offers?

Yes. Remove a style you do not make, add a new one with its base price, rename the colors or glass packages, and change any surcharge. The dropdown labels show the prices, so update them together with the constants.

Does the calculator handle installation?

Yes. The visitor chooses replacement (pocket) or new-construction (nailing fin) installation with a per-window rate, haul-away of the old windows and a flat delivery charge. Windows-only orders for customers who install themselves are supported too.

Can I offer a volume discount or a seasonal promotion?

Yes. The volume discount switches on at a number of windows you set and takes a percentage off the windows and the installation. A promotion percentage with a name shows a banner and a discount line; set it to zero when the sale ends. A minimum order always applies last.

What does the homeowner get after submitting?

A PDF estimate with a summary table, the specification of every window, the shared order options, next steps and terms, valid for the number of days you set. You get the lead with the contact details and the whole configuration.